mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-23 00:00:06 +01:00
![]() 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 |
||
---|---|---|
.. | ||
core | ||
event-libs | ||
misc | ||
plat | ||
roles | ||
tls | ||
libwebsockets.h | ||
README.md |
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 |