See Server and action script for specific information about the Server, and Events: Server events for how to use the event handlers.
Variables shown in black may be substituted by literal values, variables shown in red are assigned the result of the operation, variables in green may not be substituted by their literal equivalents.
Preparation. The Server can be configured and connected using the user interface. The necessary Server list can only be managed from there, but the actual port number can be set by the script.
||sets the Server's port number. Clients must use this port number to connect.|
|Enables or disables automatic reconnection after an interruption. Note: as long as the Server has not openened a connection, automatic reconnection does not work.|
||sets the delay in seconds between attempts to reconnect.|
||sets the number of attempts to reconnect before the pause.|
||sets the pause in seconds between batches of attempts to reconnect.|
||sets the number of times the reconnectattempts/pause cycle has to be repeated. If the value is set to -1, the cycles are always repeated.|
Once the Server is set up properly, event handlers must be installed, see Events: Server events. Then the Server can connect and disconnect to the internet. This can be done through the user interface and through scripts.
||opens a listening connection at the specified port. Before doing so, closes a connection if one is open.|
||closes a listening connection (if open), disconnecting any online clients.|
If the server has a listening connection open and the proper event handlers have been installed, ClientConnect, ClientRead and ClientDisconnect events will occur. ClientRead events can only be trapped by the script if the client has been 'captured'. See ClientRead event for how to receive messages.
||captures a client with Login name $n to receive ClientRead events from it|
||releases a client with Login name $n to stop receiving ClientRead events from it|
|IfClientIsOnline $n statement1
|executes statement1 if client with Login name $n is online, otherwise optionally executes statement2|
|ClientWriteLogin $n $a
||sends string $a to client $n|
||sends string $a to all online clients|
|ClientWriteLoginX $n $a
||sends string $a to all except to client $n|