enet.event
Description
An event is a table generated by host:service() or peer:receive() 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. Receive has an additional field named channel which contains the channel the data was received on specified by enet.peer:send, by default this is 0.
Though be wary that host:service() and peer:receive() can return nil if no events are in the queue.
Structure
event.type | event.peer | event.data | event.channel |
---|---|---|---|
"receive" | peer | string | number |
"disconnect" | peer | number | |
"connect" | peer | number |
See Also
Other Languages
Dansk –
Deutsch –
English –
Español –
Français –
Indonesia –
Italiano –
Lietuviškai –
Magyar –
Nederlands –
Polski –
Português –
Română –
Slovenský –
Suomi –
Svenska –
Türkçe –
Česky –
Ελληνικά –
Български –
Русский –
Српски –
Українська –
עברית –
ไทย –
日本語 –
正體中文 –
简体中文 –
Tiếng Việt –
한국어
More info