t_sndudata.3xti
来自「<B>Digital的Unix操作系统VAX 4.2源码</B>」· 3XTI 代码 · 共 132 行
3XTI
132 行
.TH t_sndudata 3xti.SH Namet_sndudata \- send a data unit.SH Syntax.B #include <xti.h>.br.sp 1.B int t_sndudata(\fIfd, unitdata\fB).br.B int \fIfd\fB;.br.B struct t_unitdata \fI*unitdata\fB;.SH Arguments.IP \fIfd\fR 10Identifies the local transport endpoint through which data will be sent..IP \fIunitdata\fR 10Points to a \fBt_unitdata\fR structure containing the following members:.EXstruct netbuf \fIaddr\fP;struct netbuf \fIopt\fP;struct netbuf \fIudata\fR;.EE.IP The members have the following meanings:.RS 10.IP \fIaddr\fP 12Specifies the protocol address of the destination user..IP \fIopt\fP Identifies protocol-specific options that the user wants associated with the request..IP \fIudata\fPSpecifies the user data to be sent..RE.SH DescriptionThis function is used in connectionless mode to send a data unit toanother transport user..NXR "t_sndudata system call".NXR "connectionless mode" "sending data".PP.TStab(@);lfHB lfHB lfHBlfR lfR lfR ._.sp 6pParameters@Before Call@After Call.sp 6p_.sp 6pfd@x@/unitdata->addr.maxlen@/@/unitdata->addr.len@x@/unitdata->opt.maxlen@/@/unitdata->opt.len@x@/unitdata->opt.buf@?(?)@/unitdata->udata.maxlen@/@/unitdata->udata.len@x@/unitdata->udata.buf@x(x)@/.sp 6p_.TE.PP.sp 12p.sp 2If the \fIlen\fR field of \fIudata\fR is zero, and sending of zerooctets is not supported by the underlying transport service, the.PN t_sndudata() returns \-1 with \fBt_errno\fR set to [TBADDATA]..PPBy default, .PN t_sndudata()operates in synchronous mode and may wait ifflow control restrictions prevent the data from being accepted by thelocal transport provider at the time the call is made. However, ifO_NONBLOCK is set by means of .PN t_open() or .PN fcntl(),.PN t_sndudata()executes in asynchronous mode and fails under suchconditions. The process can arrange to be notified of the clearance of aflow control restriction by means of .PN t_look()\fR.\fR .PPIf the amount of data specified in \fIudata\fR exceeds the TSDU size asreturned in the \fItsdu\fR field of the \fIinfo\fR argument of.PN t_open() or .PN t_getinfo(), the provider generates a protocol error. See [TSYSERR] under the DIAGNOSTICSsection. If .PN t_sndudata()is issued before the destination user has activated its transport endpoint, the data unit can be discarded..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, \fBt_errno\fR is set to one of the following:.TP 20[TBADF]The specified file descriptor does not refer to a transport endpoint..TP 20 [TOUTSTATE]The function was issued in the wrong sequence on the transport endpointreferenced by \fIfd\fR..TP 20[TFLOW]O_NONBLOCK was set, but the flow control mechanism prevented thetransport provider from accepting any data at this time..TP 20[TBADDATA]Illegal amount of data; zero octets are not supported..TP 20[TLOOK]An asynchronous event has occurred on the transport endpoint..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. Aprotocol error cannot cause .PN t_sndudata()to fail until a subsequent access of the transport endpoint..SH See Alsofcntl(2), t_alloc(3xti), t_open(3xti),t_rcvudata(3xti), t_rcvuderr(3xti)
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?