enet.peer:ping

enet.peer:ping Send a ping request to peer, updates round_trip_time. This is called automatically at regular intervals. Function Synopsis peer:ping() Arguments None. Returns Nothing. See Also lua-enet enet.peer enet.peer:round_trip_time

enet.peer:last round trip time

enet.peer:last round trip time Returns or sets the round trip time of the previous round trip time computation. If value is nil the current value of the peer is returned. Otherwise the the previous round trip time computation is set to the specified value and returned. ENet performs some filtering on the round trip times and it takes some time until the parameters are accurate. To speed it up you can set the value of the last round trip time to a more accurate guess. Function Synopsis peer:l

enet.peer:index

enet.peer:index Returns the index of the peer. All peers of an ENet host are kept in an array. This function finds and returns the index of the peer of its host structure. Function Synopsis peer:index() Arguments None. Returns number index The index of the peer. See Also lua-enet enet.peer enet.host

enet.peer:disconnect now

enet.peer:disconnect now Force immediate disconnection from peer. Foreign peer not guaranteed to receive disconnect notification. Function Synopsis peer:disconnect_now(data) Arguments number data Optional integer value to be associated with the disconnect. Returns Nothing. See Also lua-enet enet.peer

enet.peer:disconnect later

enet.peer:disconnect later Request a disconnection from peer, but only after all queued outgoing packets are sent. Function Synopsis peer:disconnect_later(data) Arguments number data Optional integer value to be associated with the disconnect. Returns Nothing. See Also lua-enet enet.peer

enet.peer:disconnect

enet.peer:disconnect Requests a disconnection from the peer. The message is sent on the next host:service() or host:flush(). Function Synopsis peer:disconnect(data) Arguments number data An optional integer value to be associated with the disconnect. Returns Nothing. See Also lua-enet enet.host enet.host:flush enet.host:service enet.peer

enet.peer:connect id

enet.peer:connect id Returns the field ENetPeer::connectID that is assigned for each connection. Function Synopsis peer:connect_id() Arguments None. Returns number id Unique ID that was assigned to the connection. See Also lua-enet enet.peer

enet.peer

enet.peer Description An ENet peer which data packets may be sent or received from. In most applications you'll manually keep track of connected peers. Functions Function Description peer:disconnect Requests a disconnection from the peer. peer:disconnect_now Force immediate disconnection from peer. peer:disconnect_later Request a disconnection from peer, but only after all queued outgoing packets are sent. peer:reset Forcefully disconnects peer. The peer is not notified of the

enet.linked version

enet.linked version Returns the included ENet's version as a string. Function Synopsis version = enet.linked_version() Arguments None. Returns string version ENet's version. See Also lua-enet

enet.host:total sent data

enet.host:total sent data Returns the number of bytes that were sent through the given host. Function Synopsis host:total_sent_data() Arguments None. Returns number bytes The total number of bytes sent. See Also lua-enet enet.host enet.host:total_received_data