ENet Class Library for C#
Host.Initialize Method
Initialize a host that will accept connections on a particular address, or not accept connections.
[Visual Basic]
Public Sub Initialize( _
ByVal
address As
IPEndPoint , _
ByVal
peerLimit As
Integer , _
Optional ByVal
channelLimit As
Integer = 0, _
Optional ByVal
incomingBandwidth As
Integer = 0, _
Optional ByVal
outgoingBandwidth As
Integer = 0 _
)
Parameters
address
The address to listen on, or null to not accept connections.
peerLimit
The maximum number of peers for this host.
channelLimit
The maximum number of channels, or 0 to use the maximum possible (255).
incomingBandwidth
The maximum incoming rate of transfer, or 0 for no limit.
outgoingBandwidth
The maximum outgoing rate of transfer, or 0 for no limit.
Exceptions
Exception Type
Condition
ArgumentOutOfRangeException
peerLimit is less than 0 or greater than 4095, channelLimit is less than 0 or greater than 255, incomingBandwidth is less than 0, and/or outgoingBandwidth is less than 0.
InvalidOperationException
The host is already initialized.
ENetException
Failed to initialize the host.
See Also
Host Class | ENet Namespace