t_rcv - Receives normal data or expedited data on a connection
XTI Library (libxti.a)
int *flags) ;
Interfaces documented on this reference page conform to industry standards as follows:
Refer to the standards(5) reference page for more information about industry standards and associated tags.
The following table summarizes the relevance of input and output parameters before and after t_rcv() is called:
|Parameters||Before Call||After Call|
y This is a meaningful parameter. n This is not a meaningful parameter. (y) The content of the object pointed to by y is meaningful.
When set, this bit notifies the transport user that received data is a
fragment of a Transport Service Data Unit (TSDU) or Expedited
Transport Service Data Unit (ETSDU), and that more data is available.
The rest of the TSDU or
ETSDU can be received
function calls. Each time this flag is
set on return, another
receive additional pieces of the TSDU or ETSDU. When the final TSDU or
ETSDU is received,
this flag bit has a value of 0 (zero) on return. When the transport
provider does not support TSDU or ETSDU data exchanges (refer to the
functions), the state of this flag bit should
When set, this bit notifies the transport user that received data is
an ETSDU. When the number of ETSDU data bytes exceeds the value
specified by the
parameter, this flag bit and the T_MORE flag bit
are set on return of the initial
calls issued to retrieve the rest of the ETSDU have both these
flag bits set on return. When the final piece of the ETSDU is received, the
T_MORE flag bit has a value of 0 (zero) on return.
When an ETSDU is received during reception of a TSDU, no remaining
pieces of the
TSDU may be received until the current ETSDU has been completely received.
The t_rcv() function can only be called in the T_DATAXFER and T_OUTREL transport provider states.
The t_rcv() function is an XTI connection-oriented service function that is used to receive normal or expedited data. The transport endpoint through which data arrives is specified by a file descriptor previously returned by the t_open() function. By default, t_rcv() executes in the synchronous operating mode. In synchronous mode t_rcv() waits for data to arrive even when none is currently available before returning control to the calling transport user.
When the transport endpoint, specified by the fd parameter, has been opened with the O_NONBLOCK flag set in the t_open() or fcntl() functions, the t_rcv() function executes in asynchronous mode. In asynchronous mode, when no data is available, this function fails.
In synchronous mode, the only way for a transport user to be notified of the arrival of normal or expedited data is to call the t_rcv() function or to check for states T_DATA or T_EXDATA using the t_look() function.
Upon successful completion, the t_rcv() function returns the number of bytes of data received. Otherwise, the value -1 is returned and t_errno is set to indicate the error.
If the t_rcv() function fails, t_errno is set to one of the following values:
Functions: fcntl(2), t_getinfo(3), t_look(3), t_open(3), t_snd(3).
Standards: standards(5). delim off