libmicrohttpd
[Top][All Lists]
Advanced

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

Re: [libmicrohttpd] Connection: Upgrade / WebSockets


From: silvioprog
Subject: Re: [libmicrohttpd] Connection: Upgrade / WebSockets
Date: Tue, 6 Sep 2016 20:02:21 -0300

Good news! \o/

Hello Christian, do you recommend some article/video about HTTP upgrade? I want to understand how it works too.

Thank you!

On Sun, Sep 4, 2016 at 1:14 PM, Christian Grothoff <address@hidden> wrote:
Dear all,

I've just completed adding support for "Connection: Upgrade" to
libmicrohttpd.  With this addition, it should be possible to support
WebSockets, upgrade to TLS and all kinds of other protocol switches (via
HTTP response code 101).

To use the new functionality, the application basically queues a special
response (MHD_create_response_for_upgrade) and is in return given a
socket that it can use for bidirectional communication with the client.
There are testcases in src/daemon/test_upgrade(_ssl).c that show how to
use the new API; the texinfo manual has also been updated.

The new API should work the same way *also* for TLS connections, thanks
to some socketpair-magic hiding the change from the application.


While I've tested the code, I don't _actually_ have a need for it
myself: various people on the list simply had requested support for
"Connection: Upgrade" or WebSockets. As a result, I'm obviously not 100%
sure if this does everything we need.


Thus, if you are interested in this functionality, please:

* try it now, check if the API does what you need and if not,
  let me know!
* test it now, that way once we put it into a release we will
  likely have a more stable API and implementation!


I should note that I've not done any tests on W32, I hope Evgeny will
get to this soon.


Happy hacking!

Christian

--
Silvio Clécio

reply via email to

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