Hiya,
Could anyone advise me on the correct way to receive data from a socket into a streambuf with asio?
- Read into a new streambuf for each framed TCP message, and pass the streambufs themselves around within the application, or:
- Read into a single streambuf for each socket, and copy each message into a std::vector to pass around?
Whichever way I’m passing a ‘message’ around, it would be great if I could parse it easily using istream or similar, but the documentation is a little unclear to me.
Any advice greatly appreciated!
Cheers.