How can I clear data from streambuf to file? I tried
read(*socket_, streamBuf, boost::asio::transfer_at_least(694784))
std::istream is(&streamBuf);
std::ofstream outfile;
outfile.open ("test.exe");
is >> outfile;
outfile.close()
but it didn’t work. Any clue how to do this?
source
share