lgo_DisconnectServer()
Terminate a connection to the LayGO RPC Server.
#include "laygo.h" LResult lgo_DisconnectServer ( void );
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().
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:
lgo_ConnectServer()
lgo_ConnectServerIp()
lgo_ConnectServerLocal()
lgo_ShutdownServer()
lgo_RpcConnectServer()
lgo_RpcConnectServerIp()
lgo_RpcConnectServerLocal()
lgo_RpcDisconnectServer()
lgo_RpcShutdownServer()
if (lgo_DisconnectServer() < 0) { exit(EXIT_FAILURE); }