[Libwebsockets] FYI: qpid-dispatch project now has websocket integration using libwebsockets

Alan Conway aconway at redhat.com
Thu Dec 1 00:26:20 CET 2016


Tunneling AMQP over WebSockets, initially so that a JavaScript
management client can connect directly to a qpid dispatch router
instead of via a websocket proxy. I plan to serve the javascript client
direct from the router also using libwebsocket's HTTP support. 

If you're interested in the code it is here:

https://github.com/apache/qpid-dispatch/commit/a1a1268ffbd18eb5c4605fe5
e503d70efa7be689

I am still having some trouble with closing down connections. When the
server side detects an AMQP close, I am not sure how to tell
libwebsockets about it. I'm returning -1 from the callbacks whenever
there is a sign that things are closing, but there seems to be a long,
unpredictable delay before LWS delivers a CLOSED event, during which
there is nothing for my poller to poll - it starts getting constant HUP
events, but if I take the FD out of the loop, LWS never gets to the
CLOSED event.

Cheers,
Alan.





More information about the Libwebsockets mailing list