ENet Class Library for C#

Peer.SetTimeouts Method

Sets timeouts for a response from the remote computer acknowledging its receipt of a reliable packet. When the timeouts are exceeded, a disconnect event occurs.

[Visual Basic]
Public Sub SetTimeouts( _
   ByVal retryLimit As Integer, _
   ByVal retryMinimumTime As Integer, _
   ByVal maximumTime As Integer _
public void SetTimeouts(
   int retryLimit,
   int retryMinimumTime,
   int maximumTime


The number of retries to make before considering the minimum timeout time. The default value is 5.
The minimum time in milliseconds to allow for retrying, or 0 to use the default (5000).
The maximum time in milliseconds to wait regardless of the number of retries, or 0 to use the default (30000).


Exception Type Condition
ArgumentOutOfRangeException retryLimit is negative or greater than 20, retryMinimumTime is negative, and/or maximumTime is negative.
InvalidOperationException The peer is not initialized.
NotSupportedException This method requires ENet 1.3.4 or newer.

See Also

Peer Class | ENet Namespace