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 ===
<source lang="lua">
peer:timeout(limit, minimum, maximum)
</source>
=== Arguments ===
{{param|number|limit|A factor that is multiplied with a value that based on the average [[enet.peer:round_trip_time | round trip time]] to compute the timeout limit.}}
{{param|number|minimum|Timeout value, in milliseconds, that a reliable packet has to be acknowledged if the variable timeout limit was exceeded before dropping the [[enet.peer | peer]].}}
{{param|number|maximum|Fixed timeout in milliseconds for which any packet has to be acknowledged before dropping the [[enet.peer | peer]].}}
=== Returns ===
Nothing.
=== Synopsis ===
<source lang="lua">
peer:timeout()
</source>
=== Arguments ===
None.
=== Returns ===
{{param|number|limit|A factor that is multiplied with a value that based on the average [[enet.peer:round_trip_time | round trip time]] to compute the timeout limit.}}
{{param|number|minimum|Timeout value, in milliseconds, that a reliable packet has to be acknowledged if the variable timeout limit was exceeded before dropping the [[enet.peer | peer]].}}
{{param|number|maximum|Fixed timeout in milliseconds for which any packet has to be acknowledged before dropping the [[enet.peer | peer]].}}

== See Also ==
* [[parent::lua-enet]]
* [[enet.peer]]
* [[enet.peer:round_trip_time]]
== Other Languages ==
{{i18n|enet.peer:timeout}}