RPC Server Support

Shutdown Server

lgo_ShutdownServer()

Shutdown the LayGO RPC Server.

Syntax
#include "laygo.h"

LResult lgo_ShutdownServer
    (
        LServerId    serverId
    );
serverIdid of server to shut down
Description

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.

Return Values

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:

See Also

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

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