CreateNetworkServer()

Syntax

Result = CreateNetworkServer(#Server, Port [, Mode])
Description
Create a new network #Server on the local computer at the specified port. If #PB_Any is used as '#Server' parameter, the new server number will be returned as 'Result'.

Port values can range from 6000 to 7000 (this is a recommended area space, but it can go from 0 to 65000 in reality).

Any number of servers can run simultaneously on the same computer but not with the same port number.

If the 'Result' is 0, the server can't be created (port in use), otherwise the server has been correctly created and is ready to use.

Port: Port number for this server

The optional 'Mode' parameter can be one of the following value:
  #PB_Network_TCP: The server will use the TCP network protocol (default)
  #PB_Network_UDP: The server will use the UDP network protocol

Supported OS

All

<- ConnectionID() - Network Index - EventClient() ->