8 Dec
2018
8 Dec
'18
6:59 a.m.
Hi, Are there any problems in following statements? The receiver works a few minutes, then got wrong number in header field. std::shared_ptrboost::asio::streambuf buffer = std::make_sharedboost::asio::streambuf(); std::ostream os(buffer.get()); os.write((char *) &sendHeader, sizeof(sendHeader)); os.write((char *) sb.data(), sb.size()); boost::asio::async_write(socket_, *buffer.get(), .....); Thank you. - JHH