lgo_RpcDisconnectServer()
Terminate a connection to the LayGO RPC Server.
#include "laygo.h" LResult lgo_RpcDisconnectServer ( LServerId serverId );
serverId | server to disconnect from |
lgo_RpcDisconnectServer() terminates a connection to a LayGO RPC Server established by a successful call to lgo_RpcConnectServer(). lgo_RpcDisconnectServer() should be called exactly once for each successful call to lgo_RpcConnectServer().
lgo_RpcDisconnectServer() should be the last API function called except for lgo_RpcShutdownServer().
If successful, lgo_RpcDisconnectServer() 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_DisconnectServer()
lgo_ShutdownServer()
lgo_RpcConnectServer()
lgo_RpcConnectServerIp()
lgo_RpcConnectServerLocal()
lgo_RpcShutdownServer()
if (lgo_RpcDisconnectServer() < 0) { exit(EXIT_FAILURE); }