If you look at MHD_connection_handle_idle for the case of
MHD_CONNECTION_FOOTERS_RECEIVED, you will see that MHD tests if you (or
the browser) added 'Connection: close' and if so, MHD *will* close the
TCP connection.
So adding a 'Connection: Close' header not only tells the browser to not
re-use the connection -- MHD will also enforce the protocol in that case.
Please let me know if this is not working for you for any reason.
Happy hacking,
Christian
On 11/15/2011 05:53 PM, Bent Bisballe Nyeng wrote:
Hi List.
Is it possible to force close of a connection from the server after the
reply has been sent.
Setting a 'Connection: Close' header in the reply is not sufficient
since not all clients can be relied upon to actually close their
connections when encountering this header.
In my case I have a accept-one-connection-at-the-time server that must
not be blocked by clients not correctly shutting down their conenctions
after getting their replies.
Kind regards
Bent Bisballe Nyeng