Hiya, Does anyone know a way of reading from an asio::streambuf without removing the bytes? I'm using async_read() to get (possibly several) TCP messages, where each message is prefixed with a size field. If I can read the size without removing it from the buffer, I can check whether all the data was received and leave the size intact for the next handler if not. Any advice appreciated. Cheers, James
Does anyone know a way of reading from an asio::streambuf without removing the bytes?
Use data() member function: http://www.boost.org/doc/libs/1_49_0_beta1/doc/html/boost_asio/reference/str...
Great, thanks Igor.
On 5 Feb 2012, at 07:47, Igor R
Does anyone know a way of reading from an asio::streambuf without removing the bytes?
Use data() member function: http://www.boost.org/doc/libs/1_49_0_beta1/doc/html/boost_asio/reference/str... _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
participants (2)
-
Igor R
-
James Barlow-Bignell