[Libwebsockets] reuse of lws_context_creation_info?
andy at warmcat.com
Mon Jul 1 13:15:52 CEST 2019
On 7/1/19 10:30 AM, Zevv wrote:
> It seems that in all the examples with multiple vhosts, the
> lws_context_creation_info struct used to create the initial lws_context
> is updated and reused and also passed to lws_create_vhost(). Is there a
> good reason to do this - like data being updated in the
> lws_context_creation_info struct by lws_create_context() that is later
No, a const pointer to it is passed both to create_context() and
create_vhost()... it's designed for the case it may actually be in ROM.
> needed to also create the vhosts? Or should it also be ok to create a new
> lws_context_creation_info for the vhost creation?
It's OK if you memset it to zero and set any shared (ie, used by both
context and vhost creation) things like .options.
> Thank you,
> Libwebsockets mailing list
> Libwebsockets at ml.libwebsockets.org
More information about the Libwebsockets