enet.host:get peer

enet.host:get peer

Returns the connected peer at the specified index (starting at 1). ENet stores all peers in an array of the corresponding host and re-uses unused peers for new connections. You can query the state of a peer using peer:state().

Function

Synopsis

host:get_peer(index)

Arguments

number index
The index of the desired peer.

Returns

enet.peer peer
The desired peer structure.

See Also

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

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部