lgo_ShutdownServer()
Shutdown the LayGO RPC Server.
#include "laygo.h" LResult lgo_ShutdownServer ( LServerId serverId );
serverId | id of server to shut down |
lgo_ShutdownServer() causes the specified LayGO RPC Server to terminate. A shutdown request will only succeed if all clients have disconnected from the server. An application which calls lgo_ShutdownServer() cannot be connected to any server.
If successful, lgo_ShutdownServer() 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_RpcConnectServer()
lgo_RpcConnectServerIp()
lgo_RpcConnectServerLocal()
lgo_RpcDisconnectServer()
lgo_RpcShutdownServer()
if (lgo_ShutdownServer(0) < 0) { exit(EXIT_FAILURE); }