[Libwebsockets] Multiplexing with libwebsockets

Daniel Griscom griscom at suitable.com
Mon Sep 16 14:48:22 CEST 2013

My personal need is an embedded GUI. As I've 
designed it, each visual subcomponent (built 
using Dojo) connects back to an individual object 
on the server (built using C++/libwebsockets). 
This works well, and the design is nice and 
clean, except for the proliferation of socket 
connections; I'm up to six at a time, and will 
probably add one or two more. I'm worried that 
this may cause browser trouble down the line.

I'd definitely be interested in solving this in 
the libwebsockets layer, especially if it 
followed an eventual standard.

So, questions:

- Any thoughts on a reasonable limit to the 
number of active (non-multiplexed) websocket 
connections per web page?

- Do you see Google's proposal becoming a standard?

- What kind of problems are yet to be resolved in your old code?

- If I do move forward with this, would forking 
libwebsockets on Github be an appropriate way to 


At 8:33 PM +0800 9/16/13, Andy Green (ó-à¿úN) wrote:
>On 16/09/13 20:09, the mail apparently from Daniel Griscom included:
>>[Hi, Andy. Glad you're back in business.]
>>Hello, all;
>>I'd like to multiplex several connections over a single WebSocket. I
>>know multiplexing isn't yet an official WebSocket extension, and
>>Libwebsockets doesn't support it either, so I'll either have to build it
>>myself or wait.
>>Does anyone know about the status of multiplexing in the WebSocket
>>standard? Any thoughts on implementing a solution inside Libwebsockets?
>>(It looks like a significant amount of refactoring would be required.)
>Multiplexing was discussed by Google guys as an 
>extension for a couple of years at least.
>I started implementing it (and it's still in the 
>git history) but removed it when I realized I 
>didn't really need it for what I was using 
>libwebsockets for.
>There are many callbacks still included in 
>libwebsockets that facilitate making an 
>extension to do it.
>The reversion is here so you can see what there was all in one place.
>I think there' a bit of a disconnect generally 
>between "big iron" approaches and lightweight 
>embedded library approach in terms of who would 
>use or value multiplexing.  The people who were 
>motivated to look at multiplexing didn't have a 
>use-case that would leverage the implementation 
>approach of libwebsockets.
>But if you're interested to implement we'd 
>certainly take it as an extension.  The latest 
>spec is here

Daniel T. Griscom             griscom at suitable.com
Suitable Systems              http://www.suitable.com/
1 Centre Street, Suite 204    (781) 665-0053
Wakefield, MA  01880-2400

More information about the Libwebsockets mailing list