$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
Subject: [Boost-users] Asio streambuf
From: James Barlow-Bignell (james_at_[hidden])
Date: 2012-02-04 19:05:28
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