This is my function Client::send(): void Client::send(const string &message) { ostream request_stream(&request); request_stream << message; io_service.run(); } Igor R wrote:
The problem is that I want to be able to call this send function several times, but it only works the first time I call it. For example:
Client c(host, port); //remember that the constructor calls the asynchronous methods c.send("msg to send"); c.send("msg to send");
The message is actually sent the first time, but the rest of the times nothing happens. What am I missing? Can you help me?
Obviously, it's hard to guess how your Client::send is implemented, but if it doesn't work as expected, some bug is there.
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
-- View this message in context: http://www.nabble.com/-asio--sending-multiple-messages-in-the-same-soocket-t... Sent from the Boost - Users mailing list archive at Nabble.com.