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 ValueCondition
ENOTSUPNot supported - netCORE is not running.
EINVALPointer to specification or handle is NULL.
EINVALThe connection specification event handler is NULL.
EINVALThe address specification is invalid.
EINVALThe message specification in the option block is invalid.

MULTI-THREAD SAFETY LEVEL

MT-safe.


SEE ALSO

Functions:
coreNetServerPortAdd() coreNetServerPortRemove() coreNetChanAccept() coreNetChanReject() coreNetChanConnect() coreNetChanOpen() coreNetChanClose() coreNetChanPayloadMsg() coreNetChanTxFlow() coreNetChanRxFlow() coreNetAddrInit()