Client.this

Creates a new Client, a subclass of Host

  1. this(ENet enet, size_t peerCount, size_t channelLimit, uint incomingBandwidth, uint outgoingBandwidth)
    class Client
    this
    (,
    size_t peerCount
    ,,,)
  2. this(ENet enet, size_t channelLimit, uint[2] bandwidthLimits)

Parameters

peerCount size_t

The maximum number of peers that should be allocated for the host, for clients this is useful for connecting to multiple servers.

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_create_host fails

Meta