NetworkedMultiplayerENet.createServer

Create server that listens to connections via port. The port needs to be an available, unused port between 0 and 65535. Note that ports below 1024 are privileged and may require elevated permissions depending on the platform. To change the interface the server listens on, use setBindIp. The default IP is the wildcard "*", which listens on all available interfaces. max_clients is the maximum number of clients that are allowed at once, any number up to 4095 may be used, although the achievable number of simultaneous clients may be far lower and depends on the application. For additional details on the bandwidth parameters, see createClient. Returns constant OK if a server was created, constant ERR_ALREADY_IN_USE if this NetworkedMultiplayerENet instance already has an open connection (in which case you need to call closeConnection first) or constant ERR_CANT_CREATE if the server could not be created.

struct NetworkedMultiplayerENet
@nogc nothrow
GodotError
createServer
(
in long port
,
in long max_clients = 32
,
in long in_bandwidth = 0
,
in long out_bandwidth = 0
)

Meta