mnStartServer

This initializes an instance to server state and is used to begin hosting.

Parameters

int Instance: This is the instance that the command should use.

int Maximum_number_of_clients: This is the maximum number of clients that can be connected at any one time. Clients attempting to connect when the maximum has been reached will be rejected and mnConnect/mnPollConnect will return -2. Client IDs range from 1 to the maximum number of clients.

int Maximum_number_of_operations: This is the maximum number of operations that clients can send UDP packets about. Operation IDs range from 0 to one below the maximum number of operations. This is only valid in the UDP mode: UM_PER_CLIENT_PER_OPERATION. It is ignored in all other UDP modes.

char UDP_mode: This is used to set the way in which incoming UDP packets are dealt with. Note that connecting clients use the same UDP mode. See “Unreliable (UDP)” for more information on UDP modes.

Returns (Integer)

0 if no error occurred and the server started successfully

-1 if an error occurred whilst trying to start the server

Present in

DBP

C++

.Net




This page is in the following sections:
(2) Networking Commands
(1) Networking
(0) DarkNet Help