Socket.Start
From Liberty Unleashed Wiki
This function starts listening incoming connections on the given port as a server socket.
Syntax
bool Socket.Start( int port, int maxConnections )
Arguments
- port - This is the port the socket will listen to
- maxConnections - The maximum number of simultaneous connections to the socket
Example
function onScriptLoad( ) { p_Socket <- NewSocket( "Function" ); p_Socket.Start( 5192, 1 ); }
On script load this will tell a socket to listen for data on port 5192, with a max connection limit of 1.
Notes
The call onScriptLoad was used in in this example. The function NewSocket was also used. More info about these in the corresponding pages.