mirror of
https://libwebsockets.org/repo/libwebsockets
synced 2024-11-23 17:37:33 +00:00
47e10ab200
This builds on the new dbus role support to provide a minimal example proxy between ws and dbus. A client app is provided that asks the proxy to connect to libwebsockets.org and proxy the drawing data from the mirror example there back to the dbus client using dbus messages.
35 lines
466 B
Bash
Executable File
35 lines
466 B
Bash
Executable File
#!/bin/sh
|
|
|
|
echo "Starting $0"
|
|
|
|
bin/lws-minimal-dbus-ws-proxy 2> /tmp/dbuss&
|
|
|
|
echo " server starting"
|
|
sleep 1s
|
|
PID_PROX=$!
|
|
|
|
echo " client starting"
|
|
bin/lws-minimal-dbus-ws-proxy-testclient -x 10 2> /tmp/dbusc
|
|
R=$?
|
|
|
|
kill -2 $PID_PROX
|
|
|
|
if [ $R -ne 0 ] ; then
|
|
echo "$0 FAILED"
|
|
cat /tmp/dbuss
|
|
cat /tmp/dbusc
|
|
exit 1
|
|
fi
|
|
|
|
if [ -z "`cat /tmp/dbusc | grep 'rx: 9, tx: 9'`" ] ; then
|
|
echo "$0 FAILED"
|
|
cat /tmp/dbuss
|
|
cat /tmp/dbusc
|
|
exit 1
|
|
fi
|
|
|
|
echo "$0 PASSED"
|
|
|
|
exit 0
|
|
|