title: Use streambuf as buffer for boost asio read and write
body: <p>I'm using this code for reading </p>
  
  <pre><code>  socket_.async_read_some(boost::asio::buffer(data_, max_length),
          boost::bind(&amp;session::handle_read, this,
          boost::asio::placeholders::error,
          boost::asio::placeholders::bytes_transferred));
  </code></pre>
  
  <p>and this for writing </p>
  
  <pre><code>boost::asio::async_write(socket_,
      boost::asio::buffer(data_, bytes_transferred),
      boost::bind(&amp;session::handle_write, this,
      boost::asio::placeholders::error));
  </code></pre>
  
  <p>where socket_ is socket, max_length is enum with value 1024 and data_ is char array with length of max_length.</p>
  
  <p>But I want to replace char array buffer with streambuf. I've tried </p>
  
  <pre><code>  boost::asio::streambuf streamBuffer;
    socket_.async_read_some(boost::asio::buffer(streamBuffer),
          boost::bind(&amp;session::handle_read, this,
          boost::asio::placeholders::error,
          boost::asio::placeholders::bytes_transferred));
  </code></pre>
  
  <p>But isn't working. How can I do it ?</p>