• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# lws minimal dbus ws proxy testclient
2
3This is a test client used to test `./minimal-examples/dbus-server/minimal-dbus-ws-proxy`
4
5It asks the minimal dbus ws proxy application to connect to libwebsockets.org
6over the mirror protocol.  And it proxies back the ASCII packets used to
7communicate the mirror sample drawing vectors over dbus to this test client
8if you draw on the [mirror example app](https://libwebsockets.org/testserver/)
9in a browser.
10
11## build
12
13Using libdbus requires additional non-default include paths setting, same as
14is necessary for lws build described in ./lib/roles/dbus/README.md
15
16CMake can guess one path and the library name usually, see the README above
17for details of how to override for custom libdbus and cross build.
18
19Fedora example:
20```
21$ cmake .. -DLWS_DBUS_INCLUDE2="/usr/lib64/dbus-1.0/include"
22$ make
23```
24
25Ubuntu example:
26```
27$ cmake .. -DLWS_DBUS_INCLUDE2="/usr/lib/x86_64-linux-gnu/dbus-1.0/include"
28$ make
29```
30
31## usage
32
33Commandline option|Meaning
34---|---
35-d <loglevel>|Debug verbosity in decimal, eg, -d15
36
37This connects to the minimal-dbus-ws-proxy example running in another terminal.
38
39```
40 $ ./lws-minimal-dbus-ws-proxy-testclient
41[2018/10/05 14:17:16:6286] USER: LWS minimal DBUS ws proxy testclient
42[2018/10/05 14:17:16:6538] NOTICE: Creating Vhost 'default' port 0, 1 protocols, IPv6 off
43[2018/10/05 14:17:16:6617] USER: create_dbus_client_conn: connecting to 'unix:abstract=org.libwebsockets.wsclientproxy'
44[2018/10/05 14:17:16:7189] NOTICE: create_dbus_client_conn: created OK
45[2018/10/05 14:17:16:7429] USER: remote_method_call: requesting proxy connection wss://libwebsockets.org/ lws-mirror-protocol
46[2018/10/05 14:17:17:0387] USER: pending_call_notify: received 'Connecting'
47[2018/10/05 14:17:18:7475] NOTICE: client_message_handler: (type 7) 'ws client connection established'
48[2018/10/05 14:17:21:2028] NOTICE: client_message_handler: (type 6) 'd #000000 323 63 323 67;'
49[2018/10/05 14:17:21:2197] NOTICE: client_message_handler: (type 6) 'd #000000 323 67 327 73;'
50...
51```
52
53