27 Jul
2009
27 Jul
'09
4:13 p.m.
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 don't know the answer to that either. As you are implying, this question isn't necessarily ASIO specific.
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?
I'm writing back using async_write and they seem to succeed. I might try writing back synchronously...