Boost logo

Boost Users :

Subject: Re: [Boost-users] [asio] asynchronous reading/writing to the tcp stream
From: Nat Linden (nat_at_[hidden])
Date: 2012-07-11 11:10:30


On Wed, Jul 11, 2012 at 10:44 AM, Ovanes Markarian
<om_boost_at_[hidden]> wrote:

> The commands are parsed by Spirit.QI. My idea was to use a
> tcp::iostream asynchronously so that I just pass the begin iterator to
> the output stream to QI and receive parsed data. If there is no output
> from the server the iterator should block and wait for it.

When you want code that appears to block, but is actually driven by
asynchronous I/O, that's a use case for Boost.Coroutine.
Interestingly, the new Coroutine is supposed to be reviewed very soon:
http://olk.bplaced.net/boost-coroutine.zip

I know Oliver will be very glad for your feedback.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net