[Libwebsockets] Q on protocol names

Michael Haberler mail17 at mah.priv.at
Sun Aug 10 03:54:03 CEST 2014


I've created a provisional pull request which enables this: https://github.com/warmcat/libwebsockets/pull/157

no side effects so far.

- Michael

Am 09.08.2014 um 22:36 schrieb Michael Haberler <andy.green at linaro.org>:

> 
> I'd like to have a single protocols structure, since I have a single callback only anyway, which cover http/s and ws/s
> 
> Ideally I'd inspect the ws protcol name the client desired, and upgrade to _that_ protocol, set an option in my private session structure (or deny altogether, modulo on protocol name)
> 
> is that something I could do? how?
> 
> 
> thanks,
> - Michael
> 
> since I just noted https://github.com/warmcat/libwebsockets/commit/a40760a2de74204c0c845315339b4613ce0bb439 - 
> assuming a NULL protocol name on the first and only protocol structure, would that accept _any_ protocol name the client specified? my first attempt with a single NULL protocol name got me a busily looping server..
> 
> 
> 
> _______________________________________________
> Libwebsockets mailing list
> Libwebsockets at ml.libwebsockets.org
> http://ml.libwebsockets.org/mailman/listinfo/libwebsockets




More information about the Libwebsockets mailing list