Prosody events on Windows

A Prosody event is described in Prosody events.

Events on Windows NT:

The WaitForMultipleObjects() function can be used with Prosody events. A tSMEventId is a HANDLE which can be used directly in the array of handles passed to this function. If WaitForMultipleObjects() indicates that the event is signalled, check the status of the channel (e.g. with sm_replay_status() if it is being used for replay) and read or write data if appropriate.

Note that WaitForMultipleObjects() is inherently limited to waiting for no more than 64 items at a time. If you need to wait for more (e.g. you're handling channels on trunks and have more than two trunks) the simplest way to do this is to have multiple threads (e.g. each thread might handle two trunks, needing only 60 (E1) or 48 (T1) items).