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

doc_love
2017-03-21 15:43:22
Comments
Leave a Comment

Please login to continue.