From TDN
This page is a Work In Progress by Seth Willits, dated May 13, 2008.
TGB Networking >> Server Methods
Methods on the Server
- allowConnections
- createServer
- destroyServer
- commandToClient
allowConnections( enable )
|
|
Purpose
Use the allowConnections to enable (or disable) remote connections to the local game server.
Syntax
enable - A boolean value enabling, or disabling connections to the local server.
Returns
No return value.
|
createServer( displayOnMasterServer )
|
|
Purpose
Creates a server and connects to it locally.
Syntax
displayOnMasterServer - Lists this server instance on the master server
Returns
No return value.
Callbacks
Calls onServerCreated()
|
destroyServer()
|
|
Purpose
Disconnects all clients and shuts down the server.
Syntax
No parameters.
Returns
No return value.
Callbacks
Calls onServerDestroyed()
|
commandToClient( client, func [ , arg1, ... , argn ] )
|
|
Purpose
Use the commandToClient function to issue a remote procedure call on a client.
Syntax
client - The numeric ID of a client gameConnection.
func - The suffix of the remote procedure name to be executed on the client.
arg1 .. argn - Optional arguments to be passed to the remote procedure.
Returns
No return value.
Notes
All arguments (excluding client) may be in tagged or non-tagged format. See 'Remote Procedure Call Samples' below.
|