How to get binary data from boost::asio::streambuf
How can i flush data from streambuf to file? <br>
I've 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 that didn't worked.<br>
Any clue how to do that?

How to get binary data from boost::asio::streambuf
===

How can i flush data from streambuf to file? <br>
I've 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 that didn't worked.<br>
Any clue how to do that?
