t_rcvconnect.3xti
来自「<B>Digital的Unix操作系统VAX 4.2源码</B>」· 3XTI 代码 · 共 143 行
3XTI
143 行
.TH t_rcvconnect 3xti.SH Namet_rcvconnect \- receive the confirmation from a connect request.SH Syntax.B #include <xti.h>.br.sp 1.B int t_rcvconnect(\fIfd, call\fB).br.B int \fIfd\fB;.br.B struct t_call \fI*call\fB;.SH Arguments.IP \fIfd\fR 10Identifies the local transport endpoint where communications isestablished..IP \fIcall\fR 10Contains information associated with the newly established connection.\fICall\fR points to a t_\fIcall\fR structure that contains thefollowing members:.EXstruct netbuf \fIaddr\fP;struct netbuf \fIopt\fP;struct netbuf \fIudata\fP;int \fIsequence\fR;.EE.IP The members of the \fIt_call\fR structure have the following meanings:.RS 10.IP \fIaddr\fR 12Returns the protocol address associated with the responding transport endpoint. .IP \fIopt\fR 12Presents any protocol-specific information associated with the transport endpoint. .IP \fIudata\fR 12Points to any optional user data that may be returned by the destination transport user during connection establishment..IP \fIsequence\fR 12Has no meaning for this function..RE.SH DescriptionThis function enables a calling transport user to determine the statusof a previously sent connect request. Is used in conjunction with.PN t_connect() to establish a connection in asynchronous mode. The connection is established on successful completion of this function..NXR "t_rcvconnect system call".NXR "connect request" "determining status".PPThe \fImaxlen\fR field of each argument must be set before issuing thisfunction to indicate the maximum size of the buffer for each. However,\fIcall\fR can be NULL, in which case no information is given to the useron return from .PN t_rcvconnect(). By default,.PN t_rcvconnect() executes in synchronous mode and waits for theconnection to be established before returning. On return, the\fIaddr\fR, \fIopt\fR, and \fIudata\fR fields reflect values associatedwith the connection..PP.TStab(@);lfHB lfHB lfHBlfR lfR lfR ._.sp 6pParameters@Before Call@After Call.sp 6p_.sp 6pfd@x@/call->addr.maxlen@x@/call->addr.len@/@xcall->addr.buf@x@(x)call->opt.maxlen@x@/call->opt.len@/@xcall->opt.buf@x@(x)call->udata.maxlen@x@/call->udata.len@/@xcall->udata.buf@x@(?)call->sequence@/@/.sp 6p_.TE.PP.sp 12pIf O_NONBLOCK is set by means of .PN t_open() or.PN fcntl()\fR,\fR .PN t_rcvconnect()executes in asynchronous mode and reduces to a poll for existing connect confirmations. If none is available, .PN t_rcvconnect() fails and returns immediately without waiting for the connection to be established. The.PN t_rcvconnect()function must be reissued at a later time tocomplete the connection establishment phase and retrieve the informationreturned to \fIcall\fR. .SH Return ValuesUpon successful completion, a value of 0 is returned. On failure, avalue of \-1 is returned, and \fBt_errno\fR is set to indicate theerror..SH DiagnosticsOn failure, .PN t_errno() is set to one of the following:.TP 20[TBADF]The specified file descriptor does not refer to a transport endpoint..TP 20 [TBUFOVFLW]The number of bytes allocated for an incoming argument is not sufficientto store the value of that argument. The connect information to bereturned in \fIcall\fR is discarded. The provider's state, as seenby the user, is changed to DATAXFER..TP 20[TNODATA]O_NONBLOCK was set, but a connect confirmation has not yetarrived..TP 20[TLOOK]An asynchronous event has occurred on the transport connection andrequires immediate attention..TP 20[TNOTSUPPORT]This function is not supported by the underlying transport provider. .TP 20[TOUTSTATE]The function was issued in the wrong sequence on the transport endpointreferenced by \fIfd\fR..TP 20[TSYSERR]A system error has occurred during execution of this function..SH See Alsot_accept(3xti),t_alloc(3xti),t_bind(3xti),t_connect(3xti), t_listen(3xti), t_open(3xti),t_optmgmt(3xti)
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?