[Libwebsockets] New feature: connection muxing with lws-meta protocol

Andy Green andy at warmcat.com
Fri Jul 14 05:15:18 CEST 2017

Hi -

If you have multiple client connections back to the server from one 
webpage, you might be interested in the generic lws-meta protocol now in 
lws master.

It provides a protocol "plugin" (plugins can also be built in 
statically, the lws test server uses this method now) for "lws-meta" 
protocol, which can multiplex multiple other ws connections each with 
their own arbitrary protocol.

The end result is one tcp connection (and one SSL wrapper instance) for 
multiple logical separate ws connections back to the server.

It's not entirely complete, but it's complete enough the lws test server 
now uses this to mux up to four connections it usually has back to the 
server into one.  So you can test it just by running the test server 
(the only difference you should notice is it now says all the 
connections have permessage-deflate, since it reports the situation at 
the parent lws-meta connection all the child connections are using).

More details here



More information about the Libwebsockets mailing list