| TcpServer Constructor (IPAddress, Int32, Int32) |
Initializes a new instance of the
TcpServer class with the specified local address, port, and maximum number of connections.
Namespace:
Ookii.Jumbo
Assembly:
Ookii.Jumbo (in Ookii.Jumbo.dll) Version: 2.0.0
Syntax protected TcpServer(
IPAddress[] localAddresses,
int port,
int maxConnections
)
Protected Sub New (
localAddresses As IPAddress(),
port As Integer,
maxConnections As Integer
)
protected:
TcpServer(
array<IPAddress^>^ localAddresses,
int port,
int maxConnections
)
new :
localAddresses : IPAddress[] *
port : int *
maxConnections : int -> TcpServer
Parameters
- localAddresses
- Type: System.NetIPAddress
The local IP address that the server should bind to. - port
- Type: SystemInt32
The port to listen on. - maxConnections
- Type: SystemInt32
The maximum number of simultaneous connections that the server will allow, or zero to have no maximum.
Remarks
If maxConnections is larger than zero, the TcpServer class will maintain a count of
connected clients on all specified end points. If a client tries to connect when the count is equal to maxConnections,
the connection will be refused.
If maxConnections is larger than zero, the TcpServer will send a 4-byte value (to keep the remaining data
word-aligned) that is zero to indicate the connection was rejected, or non-zero to indicate it was accepted. When maxConnections
is zero, this value is not sent.
See Also