README.md
1## Secure Streams client C++ API
2
3Enable for build by selecting `-DLWS_WITH_SECURE_STREAMS=1 -DLWS_WITH_SECURE_STREAMS_CPP=1` at
4cmake.
5
6Because it's designed for OpenSSL + system trust bundle, the minimal
7example minimal-secure-streams-cpp requires `-DLWS_WITH_MINIMAL_EXAMPLES=1 -DLWS_WITH_MBEDTLS=0`
8
9By default the -cpp example downloads https://warmcat.com/test-a.bin to the local
10file /tmp/test-a.bin. By giving, eg, -c 4, you can run four concurrent downloads of
11files test-a.bin through test-d.bin... up to 12 files may be downloaded concurrently.
12
13By default it will connect over h2 and share the single connection between all the
14downloads.
15
16### File level api
17
18```
19#include <libwebsockets.hxx>
20
21...
22
23 new lssFile(context, "https://warmcat.com/index.html",
24 "/tmp/index.html", lss_completion, 0);
25```
26
27This will copy the remote url to the given local file, and call the
28completion callback when it has succeeded or failed.
29
30