1
0
Fork 0
mirror of https://github.com/warmcat/libwebsockets.git synced 2025-03-23 00:00:06 +01:00
libwebsockets/minimal-examples-lowlevel/secure-streams/minimal-secure-streams-threads
Andy Green 53d195022f cmake: Enable WITH_MINIMAL_EXAMPLES by default
Although many of the examples must be run from the example directory as
cwd, everyone getting started probably wants to try the examples, cmake
knows how to do it, so let's enable it by default.
2021-11-11 11:52:46 +00:00
..
CMakeLists.txt cmake: Enable WITH_MINIMAL_EXAMPLES by default 2021-11-11 11:52:46 +00:00
minimal-secure-streams-threads.c examples: move existing to m-e-lowlevel and start repoulating m-e with SS 2021-10-08 09:49:05 +01:00
README.md examples: move existing to m-e-lowlevel and start repoulating m-e with SS 2021-10-08 09:49:05 +01:00

lws minimal secure streams threads

This application creates a thread and calls lws_cancel_service() at 10Hz.

It creates a Secure Stream and checks that it is getting the LWSSSCS_EVENT_WAIT_CANCELLED state for each lws_cancel_service().

It also demonstrates how to protect a shared data area between the thread(s) and the lws event loop thread to put data there that describes what the thread wants the service loop to do.

It exits after 3s with a 0 return code if the SS saw the expected amount of messages.

build

 $ cmake . && make

usage

Commandline option Meaning
-d Debug verbosity in decimal, eg, -d15