[Libwebsockets] Do we have plan to support web socket over http2 client on libwebsockets.

Andy Green andy at warmcat.com
Sat Sep 15 02:57:28 CEST 2018

On 15/09/2018 02:10, zhang guojun wrote:
> Dear libwebsockets developers.
> I’m glad to see libwebsocket support websocket over http2 server, do we have any plan to support web socket over HTTP2 client?

Yeah, but not immediately.  H2 client is working (including multi client 
stream coalescing into one h2 connection) for HTTP GET already, just not 
the ws-over-h2.

  - I don't personally need it atm.  There's a really big benefit 
implementing server side as lws already has, if your client is a browser 
with it implemented.  Once the TLS + h2 is up for fetching html / css / 
js, an additional ws connection can be established inside the h2 
connection, and start sending data, in just one RTT.  It only benefits 
clients that are opening multiple streams on the server... if the client 
just opens the one ws connection, it still has to do the TLS and start 
the h2 connection from scratch, so there's no advantage for that case.

  - It's not a small subproject... it interacts with both h1, h2 and ws 
roles / parsers and h2 needs all stream tx initiated from the h2 
round-robin scheduler.

  - Aside from the Chrome browser developers who contacted me while we 
mutually used each other's implementation for testing, IIRC you're the 
first person to acknowledge the existence of even the server work.

  - Although the draft RFC is small and unlikely to change, it's not 
offical yet (it seems just a matter of time though)

  - Implementation status outside of Chrome (it's in Canary 67+ if you 
enable special flags) is opaque.  I asked twice on httpbis and just got 
ignored.  I guess they won't enable it by default until the RFC is 
formally accepted.  If you know the server has it and your non-browser 
client has it, you don't care about browser status though.

Of course if someone wants to pay my consultancy rate for the couple of 
weeks it would take I could get religion about it.


> Thanks
> Guojun
> _______________________________________________
> Libwebsockets mailing list
> Libwebsockets at ml.libwebsockets.org
> https://libwebsockets.org/mailman/listinfo/libwebsockets

More information about the Libwebsockets mailing list