up | Inhaltsverzeichniss | Kommentar

Manual page for T_RCVCONNECT(3N)

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.

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.

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

[a manual with the abbreviation NETP]


index | Inhaltsverzeichniss | Kommentar

Created by unroff & hp-tools. © somebody (See intro for details). All Rights Reserved. Last modified 11/5/97