libmicrohttpd
[Top][All Lists]
Advanced

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

Re: [libmicrohttpd] About an HTTPS connection Upgraded


From: Evgeny Grin
Subject: Re: [libmicrohttpd] About an HTTPS connection Upgraded
Date: Sun, 7 May 2017 23:26:01 +0300
User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0

Didn't check your code (and your code is not minimal example!), but I
suspect that you call MHD_stop_daemon() before you finish working with
"upgraded" sockets.
You should call MHD_upgrade_action() with MHD_UPGRADE_ACTION_CLOSE for
each "upgraded" socket after you finished with socket and call
MHD_stop_daemon() only after you finished working with all HTTP and
"upgraded" sockets operations.

-- 
Best Wishes,
Evgeny Grin

On 07.05.2017 23:20, Nicolas Mora wrote:
> 
> 
> Le 2017-05-07 à 15:42, Christian Grothoff a écrit :
>> Eh, what is wrong is that you use "gnutls_record_send".  MHD will do
>> this for you, you should just use "send/recv", even in HTTPS mode!  In
>> fact, your code (short of MHD_start_daemon) can be exactly the same for
>> HTTP and HTTPS.
>>
> Argh, I tried that at first and it didn't work, so I used the wrong
> path, my bad.
> 
> Any I retried it without any gnutls call on the MHD_sock and I still
> have problems reading and writing the socket, nothing is transmitted,
> although the handshake is correct because the client says that the
> websocket is open, and the send and receive functions are
> 
> When the server is shut down, I have the following error messages:
> Failed to forward to remote client 53 bytes of data received from
> application: daemon shut down
> Failed to signal resume via inter-thread communication channel.
> 
> The updated code can be found here:
> https://github.com/babelouest/ulfius/blob/2.0b/src/u_websocket.c
> 
> Any clue?
> 

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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