Subject: Re: [boost] [asio]How add a timeout to asio connection?
From: David Sankel (camior_at_[hidden])
Date: 2013-06-25 13:43:33
On Tue, Jun 25, 2013 at 6:51 AM, Renato Forti <re.tf_at_[hidden]> wrote:
> Hi All,
> I have one problem, I have this class to connect to my server app:
> The problem is : if my server is down, my client (session) will block on
> io_service.run(); the client nerves end. Then I try to add a time out:
> The problem is that now the timeout expires even if the connection to the
> server occurs. What is wrong?
> My timeout should be disabled when the connection is successful! How do I
> get it? Only when the connection fails it should be called!
> Thanks for clarification
There is an example of the use of timeouts in the Boost Cookbook here: