Managing Protocol Services

Close

lgo_Close()

Release system resources reserved for a communication service.

Syntax
#include "laygo.h"

LResult lgo_Close
    (
        LCid    cid
    );
cidconnection to close
Description

lgo_Close() releases system resources acquired for a connection by lgo_Open(). lgo_Close() is not used to terminate a communication session. If a communication session has been established on the connection and has not been terminated, lgo_Close() will call lgo_Reopen() before closing the connection.

Return Values

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

See Also

lgo_Open()

Example
if (lgo_Close(cid) < 0)
{
    return (FAILURE);
}