*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->IRIX man pages -> t_rcv (3n)              
Title
Content
Arch
Section
 

Contents


t_rcv(3N)							     t_rcv(3N)


NAME    [Toc]    [Back]

     t_rcv - receive data or expedited data sent over a	connection

SYNOPSIS    [Toc]    [Back]

     #ifdef _XOPEN_SOURCE
     #include <xti.h>
     #endif

     int t_rcv (int fd,	char *buf, unsigned nbytes, int	*flags);

DESCRIPTION    [Toc]    [Back]

     This function receives either normal or expedited data.  fd identifies
     the local transport endpoint through which	data will arrive, buf points
     to	a receive buffer where user data will be placed, and nbytes specifies
     the size of the receive buffer.  flags may	be set on return from t_rcv
     and specifies optional flags as described below.

     By	default, t_rcv operates	in synchronous mode and	will wait for data to
     arrive if none is currently available.  However, if O_NDELAY or
     O_NONBLOCK	is set (via t_open or fcntl), t_rcv will execute in
     asynchronous mode and will	fail if	no data	is available.  (See TNODATA
     below.)

     On	return from the	call, if T_MORE	is set in flags, this indicates	that
     there is more data	and the	current	transport service data unit (TSDU) or
     expedited transport service data unit (ETSDU) must	be received in
     multiple t_rcv calls.  Each t_rcv with the	T_MORE flag set	indicates that
     another t_rcv must	follow to get more data	for the	current	TSDU.  The end
     of	the TSDU is identified by the return of	a t_rcv	call with the T_MORE
     flag not set.  If the transport provider does not support the concept of
     a TSDU as indicated in the	info argument on return	from t_open or
     t_getinfo,	the T_MORE flag	is not meaningful and should be	ignored.

     On	return,	the data returned is expedited data if T_EXPEDITED is set in
     flags.  If	the number of bytes of expedited data exceeds nbytes, t_rcv
     will set T_EXPEDITED and T_MORE on	return from the	initial	call.
     Subsequent	calls to retrieve the remaining	ETSDU will have	T_EXPEDITED
     set on return.  The end of	the ETSDU is identified	by the return of a
     t_rcv call	with the T_MORE	flag not set.

     If	expedited data arrives after part of a TSDU has	been retrieved,
     receipt of	the remainder of the TSDU will be suspended until the ETSDU
     has been processed.  Only after the full ETSDU has	been retrieved (T_MORE
     not set) will the remainder of the	TSDU be	available to the user.

     This function resides within both the X/Open compliant libxnet and	the
     SVR4 compliant libnsl Network Services libraries.	Network	Services
     applications which	require	X/Open compliance must link-load with -lxnet.
     Network Services applications which require SVR4 compliance must linkload
 with -lnsl.





									Page 1






t_rcv(3N)							     t_rcv(3N)



     On	failure, t_errno may be	set to one of the following:

     TBADF		The specified file descriptor does not refer to	a
			transport endpoint.

     TNODATA		O_NDELAY or O_NONBLOCK was set,	but no data is
			currently available from the transport provider.

     TLOOK		An asynchronous	event has occurred on this transport
			endpoint and requires immediate	attention.

     TNOTSUPPORT	This function is not supported by the underlying
			transport provider.

     TOUTSTATE		If _XOPEN_SOURCE is defined, then this error will be
			returned within	t_errno	when t_rcv() was issued	in the
			wrong sequence on the transport	endpoint referenced by
			fd.

     TSYSERR		A system error has occurred during execution of	this
			function.

SEE ALSO    [Toc]    [Back]

      
      
     fcntl(2), t_getinfo(3N), t_look(3N), t_open(3N), t_snd(3N)

DIAGNOSTICS    [Toc]    [Back]

     On	successful completion, t_rcv returns the number	of bytes received, and
     it	returns	-1 on failure and t_errno is set to indicate the error.


									PPPPaaaaggggeeee 2222
[ Back ]
 Similar pages
Name OS Title
t_rcv Tru64 Receive normal data or expedited data on a connection
t_snd Tru64 Send normal data or expedited data over a connection
t_rcvvudata Tru64 Receive data or expedited data sent over a
t_snd HP-UX send data or expedited data over a connection
t_snd IRIX send data or expedited data over a connection
t_rcvudata IRIX receive a data unit
t_rcvudata Tru64 Receive a data unit
t_rcvuderr IRIX receive a unit data error indication
t_rcvuderr Tru64 Receive a unit data error indication
t_rcvuderr HP-UX receive a unit data error indication
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service