Boost logo

Boost :

Subject: [boost] Will the boost::asio::streambuf keep in sequency order when ostream write to boost::asio::streambuf multiple time?
From: hh h (jupiter.hce_at_[hidden])
Date: 2018-12-08 06:59:56


Are there any problems in following statements? The receiver works a
few minutes, then got wrong number in header field.

std::shared_ptr<boost::asio::streambuf> buffer =
std::ostream os(buffer.get());
os.write((char *) &sendHeader, sizeof(sendHeader));
os.write((char *), sb.size());
boost::asio::async_write(socket_, *buffer.get(), .....);

Thank you.


Boost list run by bdawes at, gregod at, cpdaniel at, john at