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

  man pages->Tru64 Unix man pages -> t_rcv (3)              
Title
Content
Arch
Section
 

t_rcv(3)

Contents


NAME    [Toc]    [Back]

       t_rcv - Receive normal data or expedited data on a connection

SYNOPSIS    [Toc]    [Back]

       #include <xti.h>

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

LIBRARY    [Toc]    [Back]

       XTI Library (libxti.a)

STANDARDS    [Toc]    [Back]

       Interfaces documented on this reference  page  conform  to
       industry standards as follows:

       t_rcv():  XNS4.0, XNS5.0

       Refer to the standards(5) reference page for more information
 about industry standards and associated tags.

PARAMETERS    [Toc]    [Back]

       The following table summarizes the relevance of input  and
       output parameters before and after t_rcv() is called:

       --------------------------------------
       Parameters   Before Call   After Call
       --------------------------------------
       fd           y             n
       buf          y             (y)
       nbytes       y             n
       flags        n             y
       --------------------------------------


       Notes  to  Table: This is a meaningful parameter.  This is
       not a meaningful parameter.  The  content  of  the  object
       pointed  to by y is meaningful.  Specifies a file descriptor
 returned by the t_open() function that identifies  the
       local   transport  endpoint  where  an  active  connection
       exists.  Points to the receive data buffer where  returned
       data  is  to be written.  Specifies the length in bytes of
       the received-data buffer pointed to by the buf  parameter.
       Points  to  an  unsigned  integer  (least  significant bit
       rightmost) whose bits are flags that  specify  the  action
       that  must  be taken by the responding transport user when
       the t_rcv() function is  processed.  Corresponding  values
       and symbolic names for the following flag bits are defined
       in the xti.h include file:









              -----------------------------------------------------------------------
              Bit       Symbolic Name   Meaning
              -----------------------------------------------------------------------
              0         T_MORE          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 through
                                        further t_rcv() function  calls.  Each  time
                                        this   option  is  set  on  return,  another
                                        t_rcv() call can receive  additional  pieces
                                        of  the  TSDU or ETSDU.  When the final TSDU
                                        or ETSDU is received, this option bit has  a
                                        value of 0 (zero) on return. When the transport
 provider does not support TSDU or ETSDU
                                        data  exchanges  (refer  to the t_open() and
                                        t_getinfo() functions), the  state  of  this
                                        option bit should be ignored.
              1         T_EXPEDITED     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  nbytes  parameter,
                                        this  option  bit  and the T_MORE option bit
                                        are set on return  of  the  initial  t_rcv()
                                        call.  Subsequent  t_rcv()  calls  issued to
                                        retrieve the rest of  the  ETSDU  have  both
                                        these  option  bits set on return.  When the
                                        final piece of the ETSDU  is  received,  the
                                        T_MORE option 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.
              -----------------------------------------------------------------------

DESCRIPTION    [Toc]    [Back]

       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 option 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.

NOTES    [Toc]    [Back]

       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.






RETURN VALUES    [Toc]    [Back]

       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.

ERRORS    [Toc]    [Back]

       If the t_rcv() function fails, t_errno is set  to  one  of
       the  following  values: The specified file descriptor does
       not refer to a  valid  transport  endpoint.   Asynchronous
       mode  is indicated because O_NONBLOCK was set, but no data
       is currently available from the  transport  provider.   An
       asynchronous event has occurred on this transport endpoint
       and requires immediate attention (refer to t_look()  function).
   The  t_look()  function  was  issued in the wrong
       sequence on the transport endpoint referenced  by  the  fd
       parameter.   A  system  error occurred during execution of
       t_look().  This function is not supported by the  underlying
  transport provider.  This error indicates that a communication
 problem has been detected between XTI  and  the
       transport  provider  for  which there is no other suitable
       XTI(t_errno).

VALID STATES    [Toc]    [Back]

       The t_rcv() function can only be called in the  T_DATAXFER
       and T_OUTREL transport provider states.

SEE ALSO    [Toc]    [Back]

      
      
       Functions:  fcntl(2),  t_getinfo(3), t_look(3), t_open(3),
       t_snd(3).

       Standards: standards(5).

       Network Programmer's Guide



                                                         t_rcv(3)
[ Back ]
 Similar pages
Name OS Title
t_snd Tru64 Send normal data or expedited data over a connection
t_sndv Tru64 Receive data or expedited data sent over a connection
t_rcv HP-UX receive data or expedited data sent over a connection
t_rcvv Tru64 Receive data or expedited data sent over a connection
t_rcv IRIX receive data or expedited data sent over a connection
t_rcvvudata Tru64 Receive data or expedited data sent over a
t_snd IRIX send data or expedited data over a connection
t_snd HP-UX send data or expedited data over a connection
t_rcvudata IRIX receive a data unit
t_rcvudata Tru64 Receive a data unit
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service