enet.peer:timeout

Returns or sets the parameters when a timeout is detected. This is happens either after a fixed timeout or a variable timeout of time that takes the round trip time into account. The former is specified with the maximum parameter.

Function

Synopsis

peer:timeout(limit, minimum, maximum)

Arguments

number limit
A factor that is multiplied with a value that based on the average round trip time to compute the timeout limit.
number minimum
Timeout value, in milliseconds, that a reliable packet has to be acknowledged if the variable timeout limit was exceeded before dropping the peer.
number maximum
Fixed timeout in milliseconds for which any packet has to be acknowledged before dropping the peer.

Returns

Nothing.

Synopsis

peer:timeout()

Arguments

None.

Returns

number limit
A factor that is multiplied with a value that based on the average round trip time to compute the timeout limit.
number minimum
Timeout value, in milliseconds, that a reliable packet has to be acknowledged if the variable timeout limit was exceeded before dropping the peer.
number maximum
Fixed timeout in milliseconds for which any packet has to be acknowledged before dropping the peer.

See Also

Other Languages