[Libwebsockets] http client callback owner

Andy Green andy at warmcat.com
Sun Apr 23 01:20:01 CEST 2017

On 04/23/2017 06:20 AM, Joel Winarske wrote:
> Do the CLIENT callbacks only happen on protocol index 0, or do they 
> happen on which ever protocol the client was initiated from?  Meaning 
> do I get a separate client handler per protocol, or just the global 
> handler via protocol 0?  I've only had a need to use the global scheme 
> via protocol 0, until now.

Since the last few weeks on master very early in the client connection 
process the client wsi gets its protocol pointer set to the vhost 
instance of the named protocol given in the client connection info.  So 
since then even things like CONNECTION_ERROR are targeted at the vhost 
instance of the named protocol.

The reason is I had a use myself for client stuff selfcontained in the 
context of a "plugin" for ESP32 Over The Air update support... it became 
clear then everything should be called back into the plugin for client 



> -Joel
> _______________________________________________
> Libwebsockets mailing list
> Libwebsockets at ml.libwebsockets.org
> https://libwebsockets.org/mailman/listinfo/libwebsockets

More information about the Libwebsockets mailing list