A Prosody event is described in Prosody events.
The poll()
function can be used with Prosody events. A
tSMEventId is a structure with the following fields:
These can be used to construct a struct pollfd
for use with
poll()
as follows:
void event_to_pollfd(struct pollfd *pfd, tSMEventId ev) { pfd->fd = ev.fd; pfd->events = ev.mode; }
When poll()
returns, it indicates that the event is set
by a non-zero value in the revents
field. An application
should not rely on particular bits, since that makes it harder to
port the application to Microsoft Windows, which does not return any
equivalent detail from WaitForMultipleObjects().
However, for debugging purposes, it is useful to know exactly what the
revents
field can indicate. The following bits may be set in the
revents
field: