Boost logo

Boost Users :

Subject: Re: [Boost-users] Boost::asio - how to detect if a remote sockets client has disconnected
From: Igor R (boost.lists_at_[hidden])
Date: 2009-07-25 13:27:03


> My server is a basic HTTP server, and if the client has disconnected
> while I'm still processing their request I'd like to abort the
> processing (e.g. no point doing work if the client is not there waiting
> for the data).

How would you do this without ASIO, with plain sockets?

> I've read I can try to read from the socket, but in HTTP the client
> sends the request, and doesn't write any more to the socket.

Probably you can try to write back to the socket, and check if this
operation fails?


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