[Libwebsockets] How to set the "user" callback parameter for adopted sockets?

Alan Conway aconway at redhat.com
Wed Nov 23 01:02:38 CET 2016

I'm making progress! I can crash my router from a web brower :)

I can't figure out how to set the "user" parameter for lws callbacks
for a socket adopted with lws_adopt_socket(). I can access the
allocated space *after* the adopt call with lws_wsi_user(), but
lws_adopt_socket() itself is firing my callbacks so that's too late.

The docs mention setting up your session data on the
LWS_CALLBACK_ESTABLISHED event, but at that point I have nothing I can
use to find data from my application.


More information about the Libwebsockets mailing list