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

..--

mount-origin/23-Nov-2023-210184

CMakeLists.txtD23-Nov-20232.4 KiB9685

README.mdD23-Nov-2023660 2617

minimal-ws-server.cD23-Nov-20233.5 KiB13077

protocol_lws_minimal.cD23-Nov-20237.9 KiB327218

README.md

1# lws minimal ws server (threads)
2
3## build
4
5```
6 $ cmake . && make
7```
8
9Pthreads is required on your system.
10
11## usage
12
13```
14 $ ./lws-minimal-ws-server-threads
15[2018/03/13 13:09:52:2208] USER: LWS minimal ws server + threads | visit http://localhost:7681
16[2018/03/13 13:09:52:2365] NOTICE: Creating Vhost 'default' port 7681, 2 protocols, IPv6 off
17```
18
19Visit http://localhost:7681 on multiple browser windows
20
21Two asynchronous threads generate strings and add them to a ringbuffer,
22signalling lws to send new entries to all the browser windows.
23
24This demonstrates how to safely manage asynchronously generated content
25and hook it up to the lws service thread.
26