libmicrohttpd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [libmicrohttpd] How to close all upgraded connections when shutting


From: silvioprog
Subject: Re: [libmicrohttpd] How to close all upgraded connections when shutting down MHD_Daemon?
Date: Wed, 3 May 2017 21:36:42 -0300

Hello Nicolas,

I've looked something like this some time ago and the only way I've found was adding a new feature like this:

https://lists.gnu.org/archive/html/libmicrohttpd/2017-03/msg00098.html (please notice the comments about a possible "MHD_DAEMON_INFO_WAS_QUIESCED")

On Wed, May 3, 2017 at 9:18 PM, Nicolas Mora <address@hidden> wrote:
Hello,

I'm currently working on an implementation of a websocket manager with MHD and it's getting pretty good so far.

The problem I have is when the daemon is shut down and there are open connections. The documentation on MHD_quiesce_daemon says that "Note that the caller is responsible for closing the returned socket;" which is close to what I have, but since a websocket can be left open indefinitely, I need to know if the daemon needs to stop.

Is there a signal or an event or any other way for the upgrade_handler function to know that a MHD_quiesce_daemon or a MHD_stop_daemon has been sent ?

--
Silvio Cl├ęcio

reply via email to

[Prev in Thread] Current Thread [Next in Thread]