unixdev.net


Switch to SpeakEasy.net DSL

The Modular Manual Browser

Home Page
Manual: (SunOS-4.1.3)
Page:
Section:
Apropos / Subsearch:
optional field

T_RCVCONNECT(3N)                                              T_RCVCONNECT(3N)



NAME
       t_rcvconnect - receive the confirmation from a connect request

SYNOPSIS
       #include <&lt;tiuser.h>&gt;

       int t_rcvconnect(fd, call)
       int fd;
       struct t_call *call;

DESCRIPTION
       t_rcvconnect  allows  a  calling  transport user to get the status of a
       previous connect request.  It can be used in  conjunction  with  t_con-
       nect(3N) to establish a connection in asynchronous mode.

       fd  identifies  the  local  transport  endpoint  where communication is
       established.  call  contains  information  associated  with  the  newly
       established  connection call points to a t_call structure that contains
       information associated with the new connection, and is defined in <&lt;net-
       tli/tiuser.h>&gt; as:

              struct t_call {
                   struct netbuf addr;
                   struct netbuf opt;
                   struct netbuf udata;
                   int sequence;
              };

       The  maxlen, len, and buf members of the netbuf structure are described
       in t_accept(3N).  In the t_call structure, addr  returns  the  protocol
       address associated with the responding transport endpoint, opt presents
       protocol-specific information associated  with  the  connection,  udata
       points  to  optional  user data that may be returned by the destination
       transport user during connection establishment,  and  sequence  has  no
       meaning for this function.

       The maxlen field of each argument must be set before issuing this func-
       tion to indicate the maximum buffer size.  However, call may  be  NULL,
       in which case no information is given to the user on return from t_rcv-
       connect().  By default, t_rcvconnect() executes synchronously and waits
       for  the  connection  before  returning.  On return, the addr, opt, and
       udata fields reflect values associated with the connection.

       If O_NDELAY is set (using t_open(3N) or fcntl()),  t_rcvconnect()  exe-
       cutes  asynchronously,  reducing to a poll(2) request for existing con-
       nect confirmations.  If none are available,  t_rcvconnect()  fails  and
       returns  immediately  without  waiting  for the connection to be estab-
       lished.  See TNODATA below.  t_rcvconnect()  must  be  re-issued  at  a
       later  time to complete the connection establishment phase and retrieve
       the information returned in call.

RETURN VALUES
       t_rcvconnect() returns:

       0      on success.

       -1     on failure and sets t_errno to indicate the error.

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

       TBUFOVFLW           The  bytes  allocated  for  an incoming argument is
                           sufficient to store the value of that argument  and
                           the  connect  information to be returned in call is
                           discarded.  The transport provider's state, as seen
                           by the user, will be changed to DATAXFER.

       TNODATA             O_NDELAY  was  set,  but a connect confirmation has
                           not yet arrived.

       TLOOK               An asynchronous event has occurred on  this  trans-
                           port connection and requires immediate attention.

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

       TSYSERR             The function failed due to a system error  and  set
                           errno to indicate the error.

SEE ALSO
       poll(2),  intro(3),  t_accept(3N),  t_bind(3N),  t_connect(3N),  t_lis-
       ten(3N), t_open(3N)

                                21 January 1990               T_RCVCONNECT(3N)