[Libwebsockets] Determining the protocol's name from within a callback
drew at drewnoakes.com
Fri Apr 12 19:11:09 CEST 2013
I'd like to reuse a callback across many protocols. I'm creating one
protocol for each of a number of entity in my system dynamically, removing
quite a bit of near-duplicated code.
Within the callback I'll need to know which protocol I'm being called back
Can this be obtained from the wsi? I can't see how user session data would
help, as that's also initialised within the callback. libwebsocket.h only
provides a forward declaration for the wsi type, presumably to hide any
details of its internals.
Thanks in advance.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Libwebsockets