| << Prev | appCORE Programming Guide | Next >> |
NAME
coreNetChanConnect() -- establish an out going TCP connection.
SYNOPSIS
include "appcore.h" int coreNetChanConnect( coreNetChanConnectSPEC_t* s, coreHandle_t* h )
DESCRIPTION
The coreNetChanConnect() function initiates a TCP connection to the specified far-end address.
This netCORE function is asynchronous. The function status indicates if the connection attempt is proceeding. The user is notified of a completed connection via the coreNetChanEventCONNECT event and of failure via a coreNetChanEventDISCONNECT event.
PARAMETERS
s
typedef struct _core_net_chan_connect_spec_
{
void* UserCntxt;
The user's context, returned in the coreNetChanEventMsg_t
coreNetAddrSPEC_t Address;
The address family, address, and port to connect to.
coreNetOptionSPEC_t Options;
Requested channel options.
int (*EventHandler)( coreNetChanEventMsg_t* );
The user's thread local event handler. This function is called
in the context of the user's thread for channel events.
}
coreNetChanConnectSPEC_t;
h
pointer to coreHandle_t - filled in on success.
RETURN VALUE
| errno Value | Condition |
| ENOTSUP | Not supported - netCORE is not running. |
| EINVAL | Pointer to specification or handle is NULL. |
| EINVAL | The connection specification event handler is NULL. |
| EINVAL | The address specification is invalid. |
| EINVAL | The message specification in the option block is invalid. |
MULTI-THREAD SAFETY LEVEL
MT-safe.
SEE ALSO
| << Prev | appCORE Programming Guide | Next >> |