1
0
Fork 0
mirror of https://github.com/warmcat/libwebsockets.git synced 2025-03-23 00:00:06 +01:00
libwebsockets/lib
Andy Green caaf26c717 libuv: foreign loop detach doesn not require lws running the loop at all
This completely removes the loop self-running stuff.

Static allocations (uv_idle, timers etc) are referenced-counted in the context
same as the wsi are.  When lws wants to close, he first closes all his wsi, then
when that is completed in the uv close callbacks, he closes all of his static
uv handles.  When that is also completed in the uv callbacks, he stops the loop
so the lws context can destroy and exit.

Any direct libuv allocations in protocol handlers must participate in the
reference counting.  Two new apis are provided

 - lws_libuv_static_refcount_add(handle, context) to mark the handle with
   a pointer to the context and increment the global uv object counter

 - lws_libuv_static_refcount_del() which should be used as the close callback
   for your own libuv objects declared in the protocol scope.
2018-04-06 10:38:03 +08:00
..
client client: http1.1 pipelining 2018-04-06 10:38:03 +08:00
event-libs libuv: foreign loop detach doesn not require lws running the loop at all 2018-04-06 10:38:03 +08:00
ext minimal-examples: add ws pmd example 2018-03-06 09:39:27 +08:00
http2 h2 ws: fixes against chrome 2018-04-06 10:38:02 +08:00
jws lws_snprintf 2018-03-12 09:28:42 +08:00
misc esp32: map basic auth to nvs 2018-02-24 08:14:17 +08:00
plat network interface: defer bindings to absent network interfaces 2018-04-06 10:38:03 +08:00
server network interface: defer bindings to absent network interfaces 2018-04-06 10:38:03 +08:00
tls mingw: also workaround ENOTCONN 2018-04-06 10:38:03 +08:00
alloc.c acme: adaptations through plat for esp32 2017-12-11 13:30:12 +08:00
context.c libuv: foreign loop detach doesn not require lws running the loop at all 2018-04-06 10:38:03 +08:00
handshake.c logging: reduce logs related to POST and spa 2018-04-06 10:38:03 +08:00
header.c minimal: dynamic http server 2018-04-06 10:38:03 +08:00
lextable-strings.h parser: add x-auth-token 2017-12-01 11:37:36 +08:00
lextable.h parser: add x-auth-token 2017-12-01 11:37:36 +08:00
libwebsockets.c network interface: defer bindings to absent network interfaces 2018-04-06 10:38:03 +08:00
libwebsockets.h libuv: foreign loop detach doesn not require lws running the loop at all 2018-04-06 10:38:03 +08:00
minilex.c whitespace trailing mass cleanout 2015-12-14 08:52:03 +08:00
output.c udp 2018-04-06 10:38:03 +08:00
pollfd.c h2 ws: fixes against chrome 2018-04-06 10:38:02 +08:00
private-libwebsockets.h libuv: foreign loop detach doesn not require lws running the loop at all 2018-04-06 10:38:03 +08:00
service.c network interface: defer bindings to absent network interfaces 2018-04-06 10:38:03 +08:00