RPC Server Support

Disconnect Server

lgo_DisconnectServer()

Terminate a connection to the LayGO RPC Server.

Syntax
#include "laygo.h"

LResult lgo_DisconnectServer
    (
        void
    );
Description

lgo_DisconnectServer() terminates a connection to a LayGO RPC Server established by a successful call to lgo_ConnectServer(). lgo_DisconnectServer() should be called exactly once for each successful call to lgo_ConnectServer().

lgo_DisconnectServer() should be the last API function called except for lgo_ShutdownServer().

Return Values

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

See Also

lgo_ConnectServer()
lgo_ConnectServerIp()
lgo_ConnectServerLocal()
lgo_ShutdownServer()
lgo_RpcConnectServer()
lgo_RpcConnectServerIp()
lgo_RpcConnectServerLocal()
lgo_RpcDisconnectServer()
lgo_RpcShutdownServer()

Example
if (lgo_DisconnectServer() < 0)
{
    exit(EXIT_FAILURE);
}