libwebsockets/minimal-examples-lowlevel/ws-client/minimal-ws-client-echo
2023-12-08 13:23:04 +00:00
..
CMakeLists.txt cmake: upgrade everyone to 3.5 minimum version 2023-12-08 13:23:04 +00:00
minimal-ws-client-echo.c examples: move existing to m-e-lowlevel and start repoulating m-e with SS 2021-10-08 09:49:05 +01:00
protocol_lws_minimal_client_echo.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 ws client + permessage-deflate echo

This example opens a ws client connection to localhost:7681 and echoes back anything that comes from the server.

You can use it for testing lws against Autobahn.

build

 $ cmake . && make

usage

Commandline option Meaning
-d Debug verbosity in decimal, eg, -d15
-p port Port to connect to
-u url URL path part to connect to
-o Finish after one connection
--ssl Open client connection with ssl
-i Bind the client connection to interface iface
 $ ./lws-minimal-ws-client-echo
[2018/04/22 20:03:50:2343] USER: LWS minimal ws client echo + permessage-deflate + multifragment bulk message
[2018/04/22 20:03:50:2344] USER:    lws-minimal-ws-client-echo [-n (no exts)] [-u url] [-o (once)]
[2018/04/22 20:03:50:2344] USER: options 0
[2018/04/22 20:03:50:2345] NOTICE: Creating Vhost 'default' (serving disabled), 1 protocols, IPv6 off
[2018/04/22 20:03:51:2356] USER: connecting to localhost:9001//runCase?case=362&agent=libwebsockets
[2018/04/22 20:03:51:2385] NOTICE: checking client ext permessage-deflate
[2018/04/22 20:03:51:2386] NOTICE: instantiating client ext permessage-deflate
[2018/04/22 20:03:51:2386] USER: LWS_CALLBACK_CLIENT_ESTABLISHED
...