lgo_ConnectReject()
Reject a connection request from a remote system.
#include "laygo.h" LResult lgo_ConnectReject ( LCid cid, LCtlBuffer buffer, LBufferSize count );
cid | connection to reject connection on |
buffer | protocol-specific data to include in reject |
count | number of bytes in buffer |
lgo_ConnectReject() rejects a connection request from a remote system and returns the connection to the open state.
A connection on which a listen request has been issued may receive an lgo_EVENT_CONNECT_REQUEST. lgo_ConnectReject() is used in response to reject the request. lgo_ConnectReject() is not a valid response if an lgo_EVENT_CONNECTED is received instead.
lgo_ConnectReject() is a valid command only in lgo_STATE_WAITING_FOR_LOCAL_ACCEPT.
If successful, lgo_ConnectReject() returns a non-negative value. Otherwise, it returns a negative value indicating the reason it failed. Possible unsuccessful return values are:
if (lgo_ConnectReject(cid, NULL, 0) < 0) { return (FAILURE); }