7.12. event — An Events mechanism

The event module provides functions for handling events produced during the execution of an application.

7.12.1. Functions

event.onevent(callback)

Registers a callback function defined by the user that will handle the events that are produced during the execution of an application.

event.response(id, message)

Returns a response to the caller of the event. id is an integer identifier that is associated with the response and message is a string send to the caller.

event.poll()

Start waiting for events. When an event is caught, the callback function defined by the event.onevent(callback) will be called.