Boost logo

Boost Users :

Subject: Re: [Boost-users] [asio] Socket closed notification?
From: Jonathan Franklin (franklin.jonathan_at_[hidden])
Date: 2009-12-14 17:43:42


On Mon, Dec 14, 2009 at 10:52 AM, Nicola Michael Gutberlet
<nicola.gutberlet_at_[hidden]> wrote:
> I’m using TCP sockets and wonder, if there’s a possibility to get an
> automatic notification when one side of a socket is closed (even if the
> other side is crashed / not closed properly).

You generally have to do a read on the socket to reliably detect when
the other side has closed (or crashed).

Jon


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