Clients that register to receive asynchronous notification of events are inherently event-driven. Event-driven programs are typically built using an event loop, which is executed after program initialization. The event loop is never exited, but invokes program callbacks as events occur. The Event Server API provides its own event loop through the function SPD_MainLoop (see 7.11).
If your client program has its own event loop, as Windows client programs typically do, the program must periodically interrupt its event loop and call function SPD_ProcessEvents to process SPD events. See 2.2 for illustration.
Events and Event Callbacks
An event can be any of the following:
Receipt of an event from the Event Server
An expired timer
An input/output event on a specific file descriptor
Clients specify event callbacks by calling SPD_HandleEvent (see 7.8).
Timers
Clients specify timers with the functions SPD_AddTimeOut (see 7.3) and SPD_RemoveTimeOut (see 7.15). There is no limit to the number of timers that can be active at any one time.
Input/Output Handlers
Clients specify input/output handlers with the functions SPD_AddInput (see 7.2) and SPD_RemoveInput (see 7.14). There is no limit to the number of I/O handlers that can be active at any one time.