ENet Class Library for C#

Host.InitializeClient Method

Initialize a host that will not accept connections.

[Visual Basic]
Public Sub InitializeClient( _
   ByVal peerLimit As Integer _
)
[C#]
public void InitializeClient(
   int peerLimit
);

Parameters

peerLimit
The maximum number of peers for this host. If you are only connecting to one server, set this to 1.

Exceptions

Exception Type Condition
ArgumentOutOfRangeException peerLimit is less than 0 or greater than 4095.
InvalidOperationException The host is already initialized.
ENetException Failed to initialize the host.

See Also

Host Class | ENet Namespace