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 783540deaf client: libuv: fix close handling during redirect
During client redirect we "reset" the wsi to the redirect address,
involving closing the current fd that was told to redirect (it will
usually be a completely different server or port).

With libuv and its two-stage close that's not trivial.  This solves
the problem we will "reset" (overwrite) where the handle lives in the
wsi with new a new connection / handle by having it copied out into
an allocated watcher struct, which is freed in the uv close callback.

To confirm it the minimal ws client example gets some new options, the
original problem was replicated with this

$ lws-minimal-ws-client-echo -s invalid.url.com -p 80

https://github.com/warmcat/libwebsockets/issues/1390
2018-09-02 19:32:23 +08:00
..
core client: libuv: fix close handling during redirect 2018-09-02 19:32:23 +08:00
event-libs client: libuv: fix close handling during redirect 2018-09-02 19:32:23 +08:00
misc libwebsockets.h: clean out some boilerplate better put in core/private.h 2018-08-16 19:11:54 +08:00
plat windows: fix timeout between writes on Windows 2018-08-19 06:55:06 +08:00
roles client: libuv: fix close handling during redirect 2018-09-02 19:32:23 +08:00
tls LWS_WITH_STATS: clean refactor dust 2018-08-25 05:45:00 +08:00
libwebsockets.h genhmac: expose as VISIBLE 2018-08-30 06:03:41 +08:00
README.md refactor: core code in lib/core and private-libwebsockets.h to core/private.h 2018-05-03 10:49:36 +08:00

Library sources layout

Code that goes in the libwebsockets library itself lives down ./lib

Path Sources
lib/core Core lws code related to generic fd and wsi servicing and management
lib/event-libs Code containing optional event-lib specific adaptations
lib/misc Code for various mostly optional miscellaneous features
lib/plat Platform-specific adaptation code
lib/roles Code for specific optional wsi roles, eg, http/1, h2, ws, raw, etc
lib/tls Code supporting the various TLS libraries
libwebsockets.h Public API header for the whole of lws