Difference between revisions of "enet.peer:receive"

m (stylistic edit.)
m
 
(2 intermediate revisions by the same user not shown)
Line 14: Line 14:
 
* [[parent::lua-enet]]
 
* [[parent::lua-enet]]
 
* [[enet.peer]]
 
* [[enet.peer]]
 +
* [[enet.peer:send]]
 +
* [[enet.host]]
 +
* [[enet.event]]
 
== Other Languages ==
 
== Other Languages ==
 
{{i18n|enet.peer:receive}}
 
{{i18n|enet.peer:receive}}

Latest revision as of 05:28, 23 April 2021

Attempts to dequeue an incoming packet for this 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

peer:receive()

Arguments

None.

Returns

string data
Data from the received packet in a string.
number channel
Channel the packet was received from.

See Also

Other Languages