lgo_ConnectRequest()
Initiate a request to establish a communication session with a remote system.
#include "laygo.h" LResult lgo_ConnectRequest ( LCid cid, LCtlBuffer buffer, LBufferSize count );
cid | connection to attempt to effect |
buffer | protocol-defined data to include in request |
count | number of bytes in buffer |
lgo_ConnectRequest() initiates a request to establish a communication session with a remote system. The application may either cancel the request by calling lgo_Reopen() or poll for the receipt of a response using lgo_Poll() or lgo_Event().
An unsuccessful return from lgo_ConnectRequest() means that no connection request was initiated.
The contents of the buffer, if any, are defined by the protocol.
If successful, lgo_ConnectRequest() returns a non-negative value. Otherwise, it returns a negative value indicating the reason it failed. Possible unsuccessful return values are:
if (lgo_ConnectRequest(cid, NULL, 0) < 0) { return (FAILURE); }