#include <tiuser.h>
int t_rcvconnect(fd, call) int fd; struct t_call *call;
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.
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 <nettli/tiuser.h> 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 function 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_rcvconnect(). 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() 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 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.
t_rcvconnect() returns:
[a manual with the abbreviation NETP]
Created by unroff & hp-tools. © somebody (See intro for details). All Rights Reserved. Last modified 11/5/97