Boost logo

Boost Users :

Subject: Re: [Boost-users] Boost.Asio -- combining sync read with async read
From: Jonathan Franklin (franklin.jonathan_at_[hidden])
Date: 2009-10-15 11:56:36


On Thu, Oct 15, 2009 at 9:47 AM, Sameer Parekh
<sameer_at_[hidden]> wrote:
>  So I'm not sure what you mean exactly by "the server might send a few lines
> in a bunch." The server will only send one line at a time, in that it will
> call write_async for every line that it sends-- it will never call
> write_async on more than one line. However, the client might be doing some
> processing so the server might send a few lines before the client "comes up
> for air" next. If that's the case then all three lines will end up in the
> same buffer when the read_async handler is called?

Yes, just because the server program called write 3 distinct times,
doesn't mean that this will equate to 3 reads on the client side. The
actual number of reads depends on many factors, both software- and
hardware-related.

Jon


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