[Libwebsockets] lws_vhost from lws_context struct

Andy Green andy at warmcat.com
Mon May 13 11:02:20 CEST 2019

On May 13, 2019 9:55:06 AM GMT+01:00, Maarten Hoeben <hamster at xs4all.nl> wrote:

>I can’t find a function to get a lws_vhost from the lws_context
>structure. Such a function would be use to find out after context
>creation which port the vhost was bound to incase of implicit vhost
>creation. Currently the vhost structure is only obtainable from a lws
>structure, which can not be had from the lws_context structure AFAIK.

You can handle this by telling lws to just create the context without any vhost


and then create the vhost(s) explicitly, you can use the same info struct.


this lets you get pointers for n vhosts, not just the default one.


>Maarten Hoeben
>Libwebsockets mailing list
>Libwebsockets at ml.libwebsockets.org

More information about the Libwebsockets mailing list