Node.getEvent

Waits for an NetEvent to occur, and returns it. A timeout can be provided, if null, max value is used

Messages are not received till this function is called

An NetEvent is either of these: 1. data received 2. connection accepted by listener 3. connection closed 4. timeout while waiting for the above to occur

class Node
getEvent
(
TimeVal* timeout = null
)

Return Value

Type: NetEvent[]

array containing events, or empty array in case of timeout or interruption

Meta