From: Ben Hutchings (ben.hutchings_at_[hidden])
Date: 2004-09-14 09:19:48
Carlo Wood <carlo_at_[hidden]> wrote:
> No, I am confused. You do as if it trivial. But where is the answer
> to my question? How can I implement an interface that allows one to
> wait for events on 100 sockets, a timer, a few named pipes, a fifo
> and some large diskfile I/O at the same time?
> Is your answer WaitForMultipleObjects ? Then 1) what about the limit
> of 64?
That limit may well be a problem. (As may the limit on the size of an
FD_SET on POSIX systems with nothing better than select().)
> And 2) How can I use that to wait for events on SOCKET's? The only
> thing I can find for that is WSAWaitForMultipleEvents.
> But obviously you can call WSAWaitForMultipleEvents *and*
> WaitForMultipleObjects at the same time (without using threads).
The WSAEVENT type alias and associated functions appear to have been
defined as an attempt to allow for implementation on other operating
systems; in reality a WSAEVENT is a HANDLE to a Win32 event and you
can use it with WaitForMultipleObjects (this is documented in the
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk