I\'m learning Boost::asio and all that async stuff. How can I asynchronously read to variable user_
of type std::string? Boost::asio::buffer(user_)
This isn't intended to be an answer per se, but just a lengthy comment: a very simple way to convert from an ASIO buffer to a string is to stream from it:
asio::streambuf buff;
asio::read_until(source, buff, '\r'); // for example
istream is(&buff);
is >> targetstring;
This is a data copy, of course, but that's what you need to do if you want it in a string.