lgo_DisconnectConfirm()
Confirm termination of a communication session initiated by a remote system.
#include "laygo.h" LResult lgo_DisconnectConfirm ( LCid cid, LCtlBuffer buffer, LBufferSize count );
cid | connection to confirm disconnnect on |
buffer | protocol-specific data to include in confirmation |
count | number of bytes in buffer |
lgo_DisconnectConfirm() completes the orderly termination of a communication session initiated by the remote system. A successful return means that the CID has returned to the open state and can be used for another session.
lgo_DisconnectConfirm() is a valid command only in waiting for local confirmation state, that is, only after an lgo_EVENT_DISCONNECT_REQUEST has been received. If an lgo_EVENT_DISCONNECTED is received instead, no confirmation is required or allowed.
lgo_DisconnectConfirm() is provided primarily for those protocols, like X.25 SVCs, which allow transmission of data during the disconnect. Most protocols do not allow data to be transmitted during disconnect. These protocols will normally confirm the disconnect request automatically and send an lgo_EVENT_DISCONNECTED to the API.
If successful, lgo_DisconnectConfirm() returns a non-negative value. Otherwise, it returns a negative value indicating the reason it failed. Possible unsuccessful return values are:
if (lgo_DisconnectConfirm(cid, NULL, 0) < 0) { return (FAILURE); }