lgo_DisconnectRequest()
Initiate termination of a communication session established with a remote system.
#include "laygo.h" LResult lgo_DisconnectRequest ( LCid cid, LCtlBuffer buffer, LBufferSize count );
cid | connection to disconnect |
buffer | protocol-specific data to include in request |
count | number of bytes in buffer |
lgo_DisconnectRequest() initiates an orderly termination of a communication session. The application should poll for completion of the termination using lgo_Poll() or lgo_Event().
An unsuccessful return from lgo_DisconnectRequest() means that no disconnect request was initiated.
If successful, lgo_DisconnectRequest() returns a non-negative value. Otherwise, it returns a negative value indicating the reason it failed. Possible unsuccessful return values are:
if (lgo_DisconnectRequest(cid, NULL, 0) < 0) { return (FAILURE); }