title: How do I assign a string to boost beast multi_buffer?
body: <p>I have found many examples showing how to copy the contents of a boost::beast::multi_buffer to a string, but how do I assign the contents of a string to a multi_buffer that has previously been created in a class instance?</p>
  
  <p>If I have the example declarations in my class:</p>
  
  <pre><code>private:
      boost::beast::websocket::stream&lt;boost::asio::ip::tcp::socket&gt; ws_;
      boost::asio::strand&lt;boost::asio::io_context::executor_type&gt; strand_;
      boost::beast::multi_buffer buffer_;
  </code></pre>
  
  <p>how do I assign a string to buffer_ before using it in a call to:</p>
  
  <pre><code>ws_.async_write(buffer_.data(), boost::asio::bind_executor(strand_,
      std::bind(&amp;CNXG_session::on_write,
              shared_from_this(),
              std::placeholders::_1,
              std::placeholders::_2)));
  </code></pre>