Boost logo

Boost Users :

Subject: Re: [Boost-users] [asio] sending multiple messages in the same soocket
From: Henrique Aparício (henrique.aparicio_at_[hidden])
Date: 2008-12-04 11:06:20


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_at_[hidden]
> 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-tp20833971p20836551.html
Sent from the Boost - Users mailing list archive at Nabble.com.

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net