• Home
Name Date Size #Lines LOC

..--

mount-origin/03-May-2024-209185

CMakeLists.txtD03-May-20242.1 KiB8071

README.mdD03-May-20241.3 KiB3928

minimal-ws-proxy.cD03-May-20242.8 KiB10062

protocol_lws_minimal.cD03-May-20246.7 KiB280196

README.md

1# lws minimal ws proxy
2
3## Build
4
5```
6 $ cmake . && make
7```
8
9## Description
10
11This is the same as minimal-ws-server-ring, but with the
12inclusion of a ws client connection to https://libwebsockets.org
13using the dumb-increment protocol feeding the ringbuffer.
14
15Each client that connect to this server receives the content that
16had arrived on the client connection feeding the ringbuffer proxied
17to their browser window over a ws connection.
18
19## Usage
20
21```
22 $ ./lws-minimal-ws-proxy
23[2018/03/14 17:50:10:6938] USER: LWS minimal ws proxy | visit http://localhost:7681
24[2018/03/14 17:50:10:6955] NOTICE: Creating Vhost 'default' port 7681, 2 protocols, IPv6 off
25[2018/03/14 17:50:10:6955] NOTICE:  Using non-SSL mode
26[2018/03/14 17:50:10:7035] NOTICE: created client ssl context for default
27[2018/03/14 17:50:11:7047] NOTICE: binding to lws-minimal-proxy
28[2018/03/14 17:50:11:7047] NOTICE: lws_client_connect_2: 0x872e60: address libwebsockets.org
29[2018/03/14 17:50:12:3282] NOTICE: lws_client_connect_2: 0x872e60: address libwebsockets.org
30[2018/03/14 17:50:13:8195] USER: callback_minimal: established
31```
32
33Visit http://localhost:7681 on multiple browser windows
34
35Data received on the remote wss connection is copied to all open browser windows.
36
37A ringbuffer holds up to 8 lines of text in the server, and the browser shows
38the last 20 lines of received text.
39