Making Connections

Listen Cancel


Cancel a listen request.

#include "laygo.h"

LResult lgo_ListenCancel
        LCid    cid
cidconnection to return to open state from listening state

lgo_ListenCancel() cancels a listen request and returns the connection to the open state. The application may then call either lgo_ConnectRequest() or lgo_Listen() on the CID to attempt to establish a new communication session.

If lgo_ListenCancel() returns lgo_ERROR_EVENT_WAITING, the application should deal with the event from the remote system in the usual way.

Return Values

If successful, lgo_ListenCancel() returns a non-negative value. Otherwise, it returns a negative value indicating the reason it failed. Possible unsuccessful return values are:

See Also


if (lgo_ListenCancel(cid) < 0)
     return (FAILURE);