Connects to a remote computer at the given address.
The new peer. This method does not block: the connection will be established when you receive a Connect event.
Exception Type | Condition |
---|---|
ArgumentNullException | address is null. |
ArgumentException | address is not IPv4. |
ArgumentOutOfRangeException | address's port is less than 0 or greater than 65535, and/or channelLimit is less than 0 or greater than 255. |
InvalidOperationException | The host is not initialized. |
ENetException | An error occured. |
Host Class | ENet Namespace | Host.Connect Overload List