


T_RCVCONNECT(3N)        NETWORK FUNCTIONS        T_RCVCONNECT(3N)



NAME
     t_rcvconnect -  receive  the  confirmation  from  a  connect
     request

SYNOPSIS
     #include <tiuser.h>

     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_connect(3N) to establish a connection  in
     asynchronous mode.

     _f_d identifies the local transport endpoint where  communica-
     tion  is  established.  _c_a_l_l contains information associated
     with the newly  established  connection  _c_a_l_l  points  to  a
     _t__c_a_l_l  structure  that contains information associated with
     the new connection, and is defined in <nettli/tiuser.h> as:

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

     The _m_a_x_l_e_n, _l_e_n, and _b_u_f members of the _n_e_t_b_u_f structure are
     described  in  t_accept(3N).   In the _t__c_a_l_l structure, _a_d_d_r
     returns the protocol address associated with the  responding
     transport  endpoint, _o_p_t presents protocol-specific informa-
     tion  associated  with  the  connection,  _u_d_a_t_a  points   to
     optional  user  data that may be returned by the destination
     transport user during connection establishment, and _s_e_q_u_e_n_c_e
     has no meaning for this function.

     The _m_a_x_l_e_n field of each argument must be set before issuing
     this function to indicate the maximum buffer size.  However,
     _c_a_l_l may be NULL, in which case no information is  given  to
     the   user  on  return  from  t_rcvconnect().   By  default,
     t_rcvconnect() executes synchronously and waits for the con-
     nection  before  returning.   On  return, the _a_d_d_r, _o_p_t, and
     _u_d_a_t_a fields reflect values associated with the connection.

     If  O_NDELAY  is  set   (using   t_open(3N)   or   fcntl()),
     t_rcvconnect()   executes   asynchronously,  reducing  to  a
     poll(2) request for existing connect confirmations.  If none
     are  available, t_rcvconnect() fails and returns immediately
     without waiting for the connection to be  established.   See



Sun Release 4.1   Last change: 21 January 1990                  1






T_RCVCONNECT(3N)        NETWORK FUNCTIONS        T_RCVCONNECT(3N)



     TNODATA  below.  t_rcvconnect() must be re-issued at a later
     time to complete  the  connection  establishment  phase  and
     retrieve the information returned in _c_a_l_l.

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 _c_a_l_l 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  confir-
                         mation has not yet arrived.

     TLOOK               An asynchronous event  has  occurred  on
                         this  transport  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_listen(3N), t_open(3N)

     _N_e_t_w_o_r_k _P_r_o_g_r_a_m_m_i_n_g













Sun Release 4.1   Last change: 21 January 1990                  2



