[Libwebsockets] How to add virtual host dynamic

Chropin Hu chropinhu at gmail.com
Fri May 4 11:16:14 CEST 2018

Dear All,
      I am looking for the way to add virtual host dynamically.
      I have referenced to the implement of lwsws.
      For the lwsws  case, the step looks like:
           1,    create lws_context
           2,    create event loop (for the libuv case)
           3,    create the vhost from config
           4,    start event loop.

     So, For the dynamic add virtual host case, I am trying to implement it as:
            1,   start the host1 as lwsws does;
            2,   call las_create_vhost to create a new vhost2 at http response callback.
    I am not sure if this is the right thing to do.

   Thanks for any suggestions …

Yours Chropin.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://libwebsockets.org/pipermail/libwebsockets/attachments/20180504/1eada6e6/attachment-0002.html>

More information about the Libwebsockets mailing list