On 04.05.2017 16:41, Nicolas Mora wrote:
>>
>> Do you use HTTP or HTTPS?
> Eventually, since it's a framework for both http and https, I will use
> both protocols.
Behavior in undefined situation can differ in HTTP and HTTPS modes.
MHD_stop_daemon() should close all upgraded connections in HTTPS mode.


>> You must not call MHD_stop_daemon() while you still have some not closed
>> "upgraded" connections.
>> May be we should add more alarming message in case of such API violation.
> I understand.
> What I have thought of is to store a signature of all opened upgraded
> connections in an array, then before calling MHD_stop_daemon(), going
> through each connection, and close them. I guess that's the most clean
> way to do it.

Yes, it's most correct way.


>> Could you provide a minimal example?
>>
> The file
> https://github.com/babelouest/ulfius/blob/2.0/example_programs/websocket_example/websocket_example.c
> provides a minimal example of what I intend to do, although it's still
> in progress.

>From MHD point of view it's not minimal - a lot of functions and
variables that not required to trigger this behavior.

-- 
Wishes,
Evgeny


Reply via email to