Boost logo

Boost Users :

Subject: Re: [Boost-users] [asio]Does the function of async_read can find the tcp connection has closed?
From: Igor R (boost.lists_at_[hidden])
Date: 2014-04-18 05:44:02

> hi all:
> I try it. The async_read in client can't detect the connection of tcp
> close immediately when I kill the process of server, but It can find it
> after almost 3 minutes.

The only reliable and portable way to detect peer socket disconnection
is to implement application-layer ping/heartbeat.

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