An event is a table generated by host:service() or peer:recieve() which will always contain a string named type, a enet.peer named peer, and a string or number named data depending on the kind of event.
Though be wary that host:service() and peer:recieve() can return nil if no events are in the queue.
event.type | event.peer | event.data |
---|---|---|
"receive" | peer | string |
"disconnect" | peer | number |
"connect" | peer | number |
© 2006–2016 LÖVE Development Team
Licensed under the GNU Free Documentation License, Version 1.3.
https://love2d.org/wiki/enet.event