1
0
Fork 0
mirror of https://github.com/warmcat/libwebsockets.git synced 2025-03-16 00:00:07 +01:00
libwebsockets/minimal-examples/secure-streams/minimal-secure-streams-threads
Andy Green fabe78d222 Wextra
Add -Wextra (with -Wno-unused-parameter) to unix builds in addition to
-Wall -Werror.

This can successfully build everything in Sai without warnings / errors.
2021-07-04 10:29:54 +01:00
..
CMakeLists.txt ss: wire up EVENT_WAIT_CANCELLED 2021-04-15 19:10:54 +01:00
minimal-secure-streams-threads.c Wextra 2021-07-04 10:29:54 +01:00
README.md ss: wire up EVENT_WAIT_CANCELLED 2021-04-15 19:10:54 +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