Difference between revisions of "enet.peer:send"

(The flag parameter wasn't really explained in full; modified it so it's a bit more clear.)
Line 9: Line 9:
 
{{param|string|data|The contents of the packet, it must be a [[string]].}}
 
{{param|string|data|The contents of the packet, it must be a [[string]].}}
 
{{param|number|channel|The channel to send the packet on. Optional. Defaults to 0.}}
 
{{param|number|channel|The channel to send the packet on. Optional. Defaults to 0.}}
{{param|string|flag|flag is one of "reliable", "unsequenced", or "unreliable". Reliable packets are guaranteed to arrive, and arrive in the order in which they are sent. Unsequenced packets are unreliable and have no guarantee on the order they arrive. Optional. Defaults to reliable.}}
+
{{param|string|flag|flag is one of "reliable", "unsequenced", or "unreliable". Reliable packets are guaranteed to arrive, and arrive in the order in which they are sent. Unreliable packets arrive in the order in which they are sent, but they aren't guaranteed to arrive. Unsequenced packets are neither guaranteed to arrive, nor do they have any guarantee on the order they arrive. Optional. Defaults to reliable.}}
 
=== Returns ===
 
=== Returns ===
 
None
 
None

Revision as of 10:58, 7 February 2015

Queues a packet to be sent to the peer.

Function

Synopsis

peer:send(data, channel, flag)

Arguments

string data
The contents of the packet, it must be a string.
number channel
The channel to send the packet on. Optional. Defaults to 0.
string flag
flag is one of "reliable", "unsequenced", or "unreliable". Reliable packets are guaranteed to arrive, and arrive in the order in which they are sent. Unreliable packets arrive in the order in which they are sent, but they aren't guaranteed to arrive. Unsequenced packets are neither guaranteed to arrive, nor do they have any guarantee on the order they arrive. Optional. Defaults to reliable.

Returns

None

See Also

Other Languages