• Home
Name Date Size #Lines LOC

..--

README.mdD03-May-20241.3 KiB3925

ss-h1.cD03-May-202415.2 KiB572372

ss-h2.cD03-May-20245.1 KiB184105

ss-mqtt.cD03-May-20246.8 KiB249147

ss-ws.cD03-May-20244.5 KiB16697

README.md

1# Lws Protocol bindings for Secure Streams
2
3This directory contains the code wiring up normal lws protocols
4to Secure Streams.
5
6## The lws_protocols callback
7
8This is the normal lws struct lws_protocols callback that handles events and
9traffic on the lws protocol being supported.
10
11The various events and traffic are converted into calls using the Secure
12Streams api, and Secure Streams events.
13
14## The connect_munge helper
15
16Different protocols have different semantics in the arguments to the client
17connect function, this protocol-specific helper is called to munge the
18connect_info struct to match the details of the protocol selected.
19
20The `ss->policy->aux` string is used to hold protocol-specific information
21passed in the from the policy, eg, the URL path or websockets subprotocol
22name.
23
24## The (library-private) ss_pcols export
25
26Each protocol binding exports two things to other parts of lws (they
27are not exported to user code)
28
29 - a struct lws_protocols, including a pointer to the callback
30
31 - a struct ss_pcols describing how secure_streams should use, including
32   a pointer to the related connect_munge helper.
33
34In ./lib/core-net/vhost.c, enabled protocols are added to vhost protcols
35lists so they may be used.  And in ./lib/secure-streams/secure-streams.c,
36enabled struct ss_pcols are listed and checked for matches when the user
37creates a new Secure Stream.
38
39