Wait for [[enet.event | events]], send and receive any ready packets. If an [[enet.event | event]] is in the queue it will be returned and dequeued. Generally you will want to dequeue all waiting [[enet.event | events]] every frame.
== Function ==
=== Synopsis ===
<source lang="lua">
event = host:service( timeout )
</source>
=== Arguments ===
{{param|number|timeout|The max number of milliseconds to be waited for an [[enet.event | event]]. Default is 0.}}
=== Returns ===
{{param|table|event|An [[enet.event | event]] or nil if no events occured.}}

== See Also ==
* [[parent::lua-enet]]
* [[enet.event]]
== Other Languages ==
{{i18n|enet.host:service}}