[Libwebsockets] Unable to access context->user data with 1.6

Andy Green andy at warmcat.com
Thu Dec 24 05:24:59 CET 2015

On 12/24/2015 12:22 PM, Mark Hessling wrote:
> With the change in the 1.6 API to remove context as a passed parameter,
> I am unable to access the context->user data field in all my user
> callbacks. I use context->user for thread-safe data and I need this for
> every user callback at every stage. As many of the callback reasons pass
> wsi as null, I can't see a way to access the context->user data. Is
> there something I'm missing?

Yes: you can ALWAYS get the context from the wsi with


in the user callback.


> Thanks, Mark

More information about the Libwebsockets mailing list