Server.this

Creates a new Server, which is a type of Host.

class Server
this
(,
ushort port
,
size_t peerCount
,
size_t channelLimit = 0
,,)

Parameters

port ushort

Port that the server binds to

peerCount size_t

The maximum number of peers that should be allocated for the host

channelLimit size_t

The maximum number of channels allowed; if 0, then this is equivalent to ENET_PROTOCOL_MAXIMUM_CHANNEL_COUNT

incomingBandwidth uint

downstream bandwidth of the host in bytes/second; if 0, ENet will assume unlimited bandwidth

outgoingBandwidth uint

upstream bandwidth of the host in bytes/second; if 0, ENet will assume unlimited bandwidth

Throws

ENetException if enet_address_set_host fails ENetException if enet_create_host fails

Meta