[libmicrohttpd] How to detect when the client closes the connection in libmicrohttpd

2017-11-02 Thread Andrew Oseredchuk
Hello, Im writing server application based on libmicrohttpd. Clients send requests to server and server run a new process that is responsible for responce. Server process needs some time to prepare responce. During this time client could close connection. Is where a way how server/libmicrohttpd c

Re: [libmicrohttpd] How to detect when the client closes the connection in libmicrohttpd

2017-11-02 Thread Christian Grothoff
You could use MHD_CONNECTION_INFO_CONNECTION_FD to obtain the socket of a client, and then call poll/select/epoll on that yourself. Running 'recv' is likely to have unintended side-effects ;-). Happy hacking! Christian On 11/02/2017 08:40 AM, Andrew Oseredchuk wrote: > Hello, > > Im writing se