![]() Adapt the pt sul owner list to be an array, and define two different lists, one that acts like before and is the default for existing users, and another that has the ability to cooperate with systemwide suspend to restrict the interval spent suspended so that it will wake in time for the earliest thing on this wake-suspend sul list. Clean the api a bit and add lws_sul_cancel() that only needs the sul as the argument. Add a flag for client creation info to indicate that this client connection is important enough that, eg, validity checking it to detect silently dead connections should go on the wake-suspend sul list. That flag is exposed in secure streams policy so it can be added to a streamtype with "swake_validity": true Deprecate out the old vhost timer stuff that predates sul. Add a flag LWS_WITH_DEPRECATED_THINGS in cmake so users can get it back temporarily before it will be removed in a v4.2. Adapt all remaining in-tree users of it to use explicit suls. |
||
---|---|---|
.. | ||
README.md | ||
ss-h1.c | ||
ss-h2.c | ||
ss-mqtt.c | ||
ss-raw.c | ||
ss-ws.c |
Lws Protocol bindings for Secure Streams
This directory contains the code wiring up normal lws protocols to Secure Streams.
The lws_protocols callback
This is the normal lws struct lws_protocols callback that handles events and traffic on the lws protocol being supported.
The various events and traffic are converted into calls using the Secure Streams api, and Secure Streams events.
The connect_munge helper
Different protocols have different semantics in the arguments to the client connect function, this protocol-specific helper is called to munge the connect_info struct to match the details of the protocol selected.
The ss->policy->aux
string is used to hold protocol-specific information
passed in the from the policy, eg, the URL path or websockets subprotocol
name.
The (library-private) ss_pcols export
Each protocol binding exports two things to other parts of lws (they are not exported to user code)
-
a struct lws_protocols, including a pointer to the callback
-
a struct ss_pcols describing how secure_streams should use, including a pointer to the related connect_munge helper.
In ./lib/core-net/vhost.c, enabled protocols are added to vhost protcols lists so they may be used. And in ./lib/secure-streams/secure-streams.c, enabled struct ss_pcols are listed and checked for matches when the user creates a new Secure Stream.