intro.3xti
来自「<B>Digital的Unix操作系统VAX 4.2源码</B>」· 3XTI 代码 · 共 107 行
3XTI
107 行
.\".TH intro 3xti.SH Nameintro \- introduction to the X/Open Transport Interface (XTI).SH Description.NXR "X/Open Transport Interface" "introduction"The X/Open Transport Interface defines a transport service interface that is independent of any specific transport provider. The interface isprovided by way of a set of library functions for the C programming language..SH Transport ProvidersThe transport layer can comprise one or more transport providers at the same time. Thetransport provider identifier parameter passed to the .PN t_open()function determines the required transport provider..SH Transport EndpointsA transport endpoint specifies a communication path between a transport user and aspecific transport provider, which is identified by a local file descriptor \fI(fd)\fR. When a user opens a transport provider identifier, a local file descriptor\fIfd\fR is returned that identifies the transport endpoint. .SH Synchronizing Endpoints One process can simultaneously open several \fIfd\fRs. In synchronous mode, howeverthe process must manage the different actions of the associated transport connectionssequentially. Conversely, several processes can share the same \fIfd\fR (by.PN fork() or .PN dup() operations) but they have to synchronize themselves so asnot to issue a function that is unsuitable to the current state of the transport endpoint..SH Modes Of ServiceThe transport service interface supports two modes of service: connection mode and connectionless mode. A single transport endpoint cannot support both modes of service simultaneously..PPThe connection-mode transport service is circuit-oriented and enables data to betransferred over an established connection in a reliable, sequential manner. Incontrast, the connectionless-mode transport service is message-oriented and supportsdata transfer in self-contained units with no logical relationship required among multiple units..SH Error HandlingTwo levels of error are defined for the transport interface. The first is the libraryerror level. Each library function has one or more error returns. A return of \-1 indicates a failure. An external integer, \fBt_errno\fR, which is defined inthe header file \fB<xti.h>\fR, holds the specific error number when such a failureoccurs. This value is set when errors occur but is not cleared on successful librarycalls, so it should be tested only after an error has been indicated. If implemented,a diagnostic function, \fBt_error\fR, prints out information on the currenttransport error. The state of the transport provider may change if a transport erroroccurs..PPThe second level of error is the operating system service routine level. A speciallibrary level error number has been defined called [TSYSERR], which is generatedby each library function when the operating system service routine fails or some generalerror occurs. When a function sets \fBt_errno\fRto [TSYSERR], the specificsystem error can be accessed through the external variable \fBerrno\fR..SH Key For Parameter ArraysEach XTI function description, includes an array that summarizes the content ofthe input and output parameter. The key is as follows:.PP.TStab(@);lfHB lfHBl l ._.sp 6pKey@Description.sp 6p_.sp 6px@T{The parameter value is meaningful (input parameter must be set before the call and output parameter must be read after the call).T}(x)@T{The content of the object pointed by the x pointer is meaningful.T}?@T{The parameter value is meaningful, but the parameter is optional.T}(?)@T{The content of the object pointed by the ? pointer is optional.T}/@The parameter value is meaningless. \ \ \ \ \ \ \ \ \= @T{After the call, the parameter keeps the same value as before the call.T}.sp 6p_.TE.\"
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?