Boost logo

Boost Users :

Subject: Re: [Boost-users] asio, check remote socket open
From: Igor R (boost.lists_at_[hidden])
Date: 2010-07-08 10:24:06

> Inside the timer handler routine, is there any way to chek the connection is closed or
> not? (From the timer handler, I can access the socket and io_service).

Not really. To detect peer disconnection you can perform an async_read
on that socket, and in most cases it will call its handler with some
error. But this method doesn't always work - eg., in case of a
"non-graceful" cable disconnection.

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at