Boost logo

Boost :

From: Andreas Pokorny (andreas.pokorny_at_[hidden])
Date: 2007-09-11 09:13:51


Christopher Kohlhoff wrote
> Andreas Pokorny wrote:
> > But since reading the message and parsing events is mostly done
> > by a third party library, I would only need the reactor part for these.
> > Is this possible with asio?
> >
> > According to msdn it seems to be possible to create so called event
> > objects for direct input devices. I am no win32 expert so I do not know
> > if one can combine that with completion ports?
>
> Asio is not really intended for those use cases as, in general, user
> interface events follow quite a different model to things like files and
> sockets. If you want to integrate events from these sources the easiest
> approach is probably to wait for them externally to asio and then use
> io_service::post() to execute the handlers (or alternatively write a
> custom asio service to do the same thing), but since you're not using
> asio for anything else it doesn't seem worth it to me. You're welcome to
> reuse any bits of asio that you find useful, though.

Oh you got me wrong here, I wanted to use the deadline timers and probably
several network connections with low traffic.

So I thought if there was a completion criteria that says, "anything
to read", I
could do pretty much everything I need with the existing asio. Well, at least
on Unix-like systems (x11,file alteration, directfb; linux joysticks can be
easily parsed into a event data structure). Windows seems like a completely
different story.

kind regards
Andreas Pokorny


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk