enet.peer:send

enet.peer:send

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

Nothing.

See Also

© 2006–2016 LÖVE Development Team
Licensed under the GNU Free Documentation License, Version 1.3.
https://love2d.org/wiki/enet.peer:send

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部