t_rcvdis.3xti
来自「<B>Digital的Unix操作系统VAX 4.2源码</B>」· 3XTI 代码 · 共 116 行
3XTI
116 行
.TH t_rcvdis 3xti.SH Namet_rcvdis \- retrieve information from disconnect.SH Syntax.B #include <xti.h>.br.sp 1.B int t_rcvdis(\fIfd, discon\fB).br.B int \fIfd\fB;.br.B struct t_discon \fI*discon\fB;.SH Arguments.IP \fIfd\fR 10Identifies the local transport endpoint. .IP \fIdiscon\fR 10Points to a \fBt_discon\fR structure containing the following members:.EXstruct netbuf \fIudata\fP;int \fIreason\fP;int \fIsequence\fR:.EE.IPThe members of the \fIt_discon\fR struct have the following meanings:.RS 10.IP \fIudata\fR 12Identifies any user data that was sent with the disconnect..IP \fIreason\fRSpecifies the reason for the disconnect through a protocol-dependent reason code..IP \fIsequence\fRIdentifies an outstanding connect indication with which the connection is associated. The \fIsequence\fR field is only meaningful when .PN t_rcvdis()is issued by a passive transport user who has executed one or more .Pn t_listen()functions and is processing the resulting connect indications. If a disconnect indication occurs, \fIsequence\fP can be used to identify which of the outstanding connect indications is associatedwith the disconnect..RE.SH DescriptionThis function is used to identify the cause of a disconnect and toretrieve any user data sent with the disconnect..NXR "t_rcvdis system call".NXR "disconnect" "retrieving information".PPIf a user does not care if there is incoming data and does not need toknow the value of \fIreason\fR or \fIsequence\fR, \fIdiscon\fR may beNULL and any user data associated with the disconnect is discarded.However, if a user has retrieved more than one outstanding connectindication, by means of .PN t_listen()and \fIdiscon\fR is NULL, the user will be unable to identify with which connect indication thedisconnect is associated..PP.TStab(@);lfHB lfHB lfHBlfR lfR lfR ._.sp 6pParameters@Before Call@After Call.sp 6p_.sp 6pfd@x@/discon->udata.maxlen@x@/discon->udata.len@/@xdiscon->udata.buf@x@(?)discon->reason@/@xdiscon->sequence@/@?.sp 6p_.TE.PP.sp 12p.SH Return ValuesUpon successful completion, a value of 0 is returned. On failure, avalue of \-1 is returned, and .PN t_errno()is set to indicate the error..SH DiagnosticsOn failure, \fBt_errno\fR is set to one of the following:.TP 20[TBADF]The specified file descriptor \fIfd\fR does not refer to atransport endpoint..TP 20 [TOUTSTATE]The function was issued in the wrong sequence on the transport endpointreferenced by \fIfd\fR..TP 20[TNODIS]No disconnect indication currently exists on the specified transportendpoint..TP 20[TBUFOVFLW]The number of bytes allocated for incoming data is not sufficient tostore the data. If \fIfd\fR is a passive endpoint with \fIocnt\fR > 1,it remains in state T_INCON; otherwise, the endpoint state isset to T_IDLE. The disconnect indication information to bereturned in \fIdiscon\fR will be discarded..TP 20[TNOTSUPPORT]This function is not supported by the underlying transport provider. .TP 20[TSYSERR]A system error has occurred during execution of this function..SH See Alsot_alloc(3xti),t_connect(3xti), t_listen(3xti), t_open(3xti),t_snddis(3xti)
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?