|Constructs an EventArray with an empty list of events. |
|Removes all the events added with AddEvent from this EventArray. |
|void||AddEvent (const Event &e)|
|Adds the given event to the array. |
|int||Wait (int msecs)|
|Waits for any of the added events to be triggered. |
|int||Size () const|
|Returns the number of events added to the array. |
|static const int||WaitTimedOut = -1|
|This status code is returned by Wait when none of the added events were triggered during the timeout period. |
|static const int||WaitFailed = -2|
|This status code is returned by Wait when the OS specified an error - the wait list most likely contains invalid entries. |
EventArray stores a list of events and allows the application to simultaneously wait for any of them to become set.
This object never calls Create() or Close() on any Event that is added to it.
|void kNet::EventArray::AddEvent||(||const Event &||e||)|
Adds the given event to the array.
There is a limitation of maximum of 64 simultaneous Events that can be added to an array.
Waits for any of the added events to be triggered.
Returns the index of the signalled event, or EventArray::WaitTimedOut if none of the events triggered during the time period, or EventArray::WaitFailed if there were invalid event objects added in the array.