Boost logo

Boost Users :

Subject: Re: [Boost-users] [asio] serial_port::async_read_some() and scalablebuffers
From: Igor R (boost.lists_at_[hidden])
Date: 2009-08-28 04:34:27


> So, in other words there is no way of doing this without using a
> completion condition? There's no simple function that will just fill
> up the read buffer with all of the data it can obtain?

No. But you can do as follows:
1) start an async. read with the condition transfer_at_least(1)
2) in the handler check socket.available() and perform synchronous
read of this amount of data


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