[Libwebsockets] lws + libuv ( mac/freebsd ), explicit_vhosts

Aleksey Zhukovskiy beetle at gambler.ru
Sun Nov 27 18:26:18 CET 2016

Hi all,
I've got working soft, using pure libwebsockets for HTTP-serving,
ws-serving, HTTP- and websocket- clients. Using
Now Im trying to plug libuv _only_ for better perfomance.
There are problems when creating second vhost (for listening
ssl-websockets). Segmentation fault at freebsd/mac on. gdb shows

#0  0x000000080112d8fc in uv_fileno () from /usr/local/lib/libuv.so.1
#1  0x00000008011329bc in uv_poll_start () from /usr/local/lib/libuv.so.1
#2  0x0000000800895391 in lws_libuv_io (wsi=0x8037e0200, flags=5) at
#3  0x000000080088ad97 in lws_plat_insert_socket_into_fds
(context=0x8033eb000, wsi=0x8037e0200)
    at /home/beetle/lws/libwebsockets/lib/lws-plat-unix.c:566
#4  0x0000000800874a64 in insert_wsi_socket_into_fds (context=0x8033eb000,
    at /home/beetle/lws/libwebsockets/lib/pollfd.c:163
#5  0x000000080088b68b in lws_context_init_server (info=0x647a20,
vhost=0x80392a200) at /home/beetle/lws/libwebsockets/lib/server.c:156
#6  0x000000080087bb1a in lws_create_vhost (context=0x8033eb000,
info=0x647a20) at /home/beetle/lws/libwebsockets/lib/context.c:512

I tried different parameters, the same. I dont understand last two calls,
cant find proper sources. Should I dig deeper or maybe before it you can
help with only 2 questions

1. It there a reason to use libuv/ev for better perfomance at all?
2. Between these two should I choose libev because it was tested
better and embedded
in a larger number of projects?

Thank you for answers,
and for lws specially
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://libwebsockets.org/pipermail/libwebsockets/attachments/20161127/8e3660a7/attachment.html>

More information about the Libwebsockets mailing list