aboutsummaryrefslogtreecommitdiffstats
path: root/stress-server.sh
diff options
context:
space:
mode:
authorJosé Bollo <jose.bollo@iot.bzh>2017-04-13 16:05:30 +0200
committerJosé Bollo <jose.bollo@iot.bzh>2017-04-13 23:02:25 +0200
commit9991f9f55b6b77bf89a9e2cec84280d0c9c0b2cd (patch)
tree208d68b50737dbce695989bcab3011df24f9ba7f /stress-server.sh
parent062887f854dba260a2fc12bd4c388baea65f524a (diff)
Implement subcall for services over websockets
This modification make subcalls pushed back to the client that will issue it for itself. This will at the end ensure the security context of the client. Change-Id: Ib4bb5125ffe1b942103b72d1a3d13892dda87baa Signed-off-by: José Bollo <jose.bollo@iot.bzh>
Diffstat (limited to 'stress-server.sh')
-rwxr-xr-xstress-server.sh18
1 files changed, 15 insertions, 3 deletions
diff --git a/stress-server.sh b/stress-server.sh
index a0d83fd9..31fce9f6 100755
--- a/stress-server.sh
+++ b/stress-server.sh
@@ -3,16 +3,28 @@
ROOT=$(dirname $0)
echo ROOT=$ROOT
-AFB=$ROOT/build/src/afb-daemon
+cd $ROOT
+
+AFB=build/src/afb-daemon
HELLO=build/bindings/samples/helloWorld.so
PORT=12345
TEST=test
TOKEN=knock-knock-knoc
-OUT=$ROOT/stress-out-server
+OUT=stress-out-server
rm $OUT*
-ARGS="-q --session-max=100 --port=$PORT --workdir=$ROOT --roothttp=$TEST --token=$TOKEN --ldpaths=/tmp --binding=$HELLO"
+case "$1" in
+ --ws)
+ shift
+ ARGS="-q --ldpaths=/tmp --binding=$HELLO --session-max=100 --ws-server=unix:hello --no-httpd --exec $AFB --session-max=100 --port=$PORT --ldpaths=/tmp --roothttp=$TEST --token=$TOKEN --ws-client=unix:hello "
+# ARGS="-vv --tracereq=all --ldpaths=/tmp --binding=$HELLO --session-max=100 --ws-server=unix:hello --no-httpd --exec $AFB --session-max=100 --port=$PORT --ldpaths=/tmp --roothttp=$TEST --token=$TOKEN --ws-client=unix:hello "
+ ;;
+ *)
+ ARGS="-q --session-max=100 --port=$PORT --workdir=$ROOT --roothttp=$TEST --token=$TOKEN --ldpaths=/tmp --binding=$HELLO"
+ ;;
+esac
+
echo -n launch afb...
case "$1" in