receive the confirmation from a connect request
cc [options] file -lnsl
int t_rcvconnect(int fd, struct t_call call)
This function is a routine for establishing a transport connection.
t_rcvconnect enables a calling transport user to determine
the status of a connect request that it issued
to a responding transport endpoint.
On successful completion of t_rcvconnect, the connection
is initiated with an asynchronous t_connect is established.
By default, t_rcvconnect executes in synchronous mode and
waits for the connection to be established before returning.
identifies the responding transport endpoint, and on return call
contains information associated with the newly established connection.
the file descriptor for the transport endpoint where communication
will be established.
points to the t_call structure used to identify
the transport user that will receive the connection indication.
The call argument
points to a t_call structure which contains the following members:
struct netbuf addr; /* address */
struct netbuf opt; /* options */
struct netbuf udata; /* user data */
int sequence; /* sequence number */
netbuf is described in
addr returns the protocol address
associated with the responding transport endpoint,
presents any protocol-specific information associated with
udata points to optional user data that
may be returned by the destination transport user during connection
sequence has no meaning for this function.
maxlen field of each argument must be set before
issuing this function to indicate the maximum size of the buffer
for each. However, call may be NULL, in which case no
information is given to the user on return from t_rcvconnect.
On return, the
fields reflect values associated with the connection.
If O_NONBLOCK is set (via t_open or fcntl),
t_rcvconnect executes in asynchronous mode, and reduces to a
poll for existing connect confirmations. If none are available,
t_rcvconnect fails on a TNODATA error and returns
immediately without waiting for the connection to be established.
On entry, T_OUTCON; T_DATAXFER (successful)
or T_OUTCON (failed) on exit.
X/Open® Transport Interface Library (shared object)
Network Services Library (shared object)
A subsequent call to t_rcvconnect is required
to complete the connection establishment phase and
retrieve the information returned in call.
t_rcvconnect returns 0 on success and -1 on failure and
t_errno is set to indicate the error.
On failure, t_errno may be set to one of the following:
The specified file descriptor does not refer to a transport endpoint.
The number of bytes (
maxlen) allocated for an incoming argument
is greater than zero but not sufficient to store the value of that argument.
The connect information to be returned in
call will be discarded.
The provider's state, as seen by the user, will be changed to
O_NONBLOCK was set, but a connect confirmation has not yet arrived.
An asynchronous event has occurred on the transport connection
specified by fd and requires immediate attention.
This function is not supported by the underlying transport
A system error has occurred during execution of this function.
The function was issued in the wrong sequence
on the transport endpoint referenced by fd.
A communication problem has been detected with the transport provider
and there is no other value of t_errno to describe
the error condition.
© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 25 April 2004