• Home
Name Date Size #Lines LOC

..--

CMakeLists.txtD03-May-20242.4 KiB9182

README.mdD03-May-20241 KiB3423

minimal-ws-client.cD03-May-20248.4 KiB343226

README.md

1# lws minimal ws client tx
2
3This demonstrates a ws "publisher" to go with the minimal-ws-broker example.
4
5Two threads are spawned that produce messages to be sent to the broker,
6via a local ringbuffer.  Locking is provided to make ringbuffer access threadsafe.
7
8When a nailed-up client connection to the broker is established, the
9ringbuffer is sent to the broker, which distributes the events to all
10connected clients.
11
12## build
13
14```
15 $ cmake . && make
16```
17
18## usage
19
20This example connects to ws-server/minimal-ws-broker, so you need to build and run
21that in another terminal.
22
23```
24 $ ./lws-minimal-ws-client-tx
25[2018/03/16 16:04:33:5774] USER: LWS minimal ws client tx
26[2018/03/16 16:04:33:5774] USER:   Run minimal-ws-broker and browse to that
27[2018/03/16 16:04:33:5774] NOTICE: Creating Vhost 'default' port -1, 1 protocols, IPv6 off
28[2018/03/16 16:04:34:5794] USER: callback_minimal_broker: established
29```
30
31If you open a browser on http://localhost:7681 , you will see the subscribed
32messages from the threads in this app via the broker app.
33
34