• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

README.mdH A D01-Jan-19701.3 KiB3925

ss-h1.cH A D01-Jan-197028.1 KiB1,122727

ss-h2.cH A D01-Jan-19705.9 KiB225129

ss-mqtt.cH A D01-Jan-197014.8 KiB533363

ss-raw.cH A D01-Jan-19705.3 KiB193127

ss-ws.cH A D01-Jan-19706.7 KiB247157

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