I know it's not safe to manipulated streambuf while async_write working as stated by asio author on boost mailing list. What I want to know is, is it safe to manipulated streambuf after async_read?
Example:
async_read(socket_, recv_streambuf_, ...);
// manipulated while async_read is working
// for example, after I call async_read,
recv_streambuf_.consume(2);
// or something advance, like this...
int var;
std::istream recv_is(recv_streambuf_);
recv_is >> var;