Boost logo

Boost Users :

Subject: [Boost-users] Asio streambuf
From: James Barlow-Bignell (james_at_[hidden])
Date: 2012-02-04 19:05:28



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.




Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at