Attempts to dequeue an incoming packet for this [[enet.peer | peer]]. Returns [[nil]] if there are no packets waiting. Otherwise returns two values: The string representing the packet data, and the channel the packet came from.
== Function ==
=== Synopsis ===
<source lang="lua">
peer:receive()
</source>
=== Arguments ===
None.
=== Returns ===
{{param|string|data|Data from the received packet in a string.}}
{{param|number|channel|Channel the packet was received from.}}

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