[Libwebsockets] libuv loops from within lwsws plugins

Dan White dwhite at cafedemocracy.org
Fri Jul 29 20:00:21 CEST 2016


On 07/30/16 00:54 +0800, Andy Green wrote:
>On July 29, 2016 10:09:21 PM GMT+08:00, Dan White <dwhite at cafedemocracy.org> wrote:
>>I've installed version 2.0.2 and created a test external plugin which
>>creates it's own (default) libuv event loop, and seems to work with a
>>simple libcurl test.
>>
>>Is this recommended from within the lwsws server or should I be using
>>multiple loops and coordinating with lwsws's default loop?
>
>What the provided plugins do (eg, dumb increment timer)
>
>https://github.com/warmcat/libwebsockets/blob/master/plugins/protocol_dumb_increment.c
>
>is use the lws loop from the public api lws_uv_getloop(), that's definitely the best way.

Perfect. lws_uv_getloop() will work just fine.

-- 
Dan White



More information about the Libwebsockets mailing list