File tree 8 files changed +91
-12
lines changed
8 files changed +91
-12
lines changed Original file line number Diff line number Diff line change
1
+ # 2.1.4
2
+
3
+ - Allow Ratchet/RFC6455 0.3
4
+
5
+ # 2.1.3
6
+
7
+ - Forward compatibility with voryx/event-loop 3.0 while supporting 2.0
8
+
1
9
# 2.1.2
2
10
3
11
- Update deps
Original file line number Diff line number Diff line change 40
40
"react/http" : " ^0.7.3 | ^0.8" ,
41
41
"react/http-client" : " ^0.5.3" ,
42
42
"voryx/event-loop" : " ^3.0 || ^2.0.2" ,
43
- "ratchet/rfc6455" : " ^0.2.2" ,
43
+ "ratchet/rfc6455" : " ^0.2.2 || ^0.3 " ,
44
44
"reactivex/rxphp" : " ^2.0.1"
45
45
},
46
46
"require-dev" : {
Original file line number Diff line number Diff line change 7
7
8
8
class TestCase extends FunctionalTestCase
9
9
{
10
- public function setup ()
10
+ public function setup (): void
11
11
{
12
12
parent ::setup ();
13
13
@@ -29,4 +29,4 @@ public static function resetScheduler()
29
29
$ prop ->setAccessible (false );
30
30
}
31
31
}
32
- }
32
+ }
Original file line number Diff line number Diff line change 12
12
$ reportUrl = "ws://127.0.0.1:9001/updateReports?agent= " . AGENT . "&shutdownOnComplete=true " ;
13
13
$ client = new \Rx \Websocket \Client ($ reportUrl );
14
14
15
- $ client ->subscribe ();
15
+ $ client ->subscribe (
16
+ function (\Rx \Websocket \MessageSubject $ messages ) {
17
+ echo "Report runner connected. \n" ;
18
+ $ messages ->subscribe (new \Rx \Observer \CallbackObserver (
19
+ function ($ x ) use ($ messages ) {
20
+ echo "Message received by report runner connection: " . $ x . "\n" ;;
21
+ },
22
+ [$ messages , "onError " ],
23
+ [$ messages , "onCompleted " ]
24
+ ));
25
+ },
26
+ function (Throwable $ error ) {
27
+ echo "Error on report runner connection: " . $ error ->getMessage () . "\n" ;
28
+ echo "Seeing an error here might be normal. Network trace shows that AB fuzzingserver \n" ;
29
+ echo "disconnects without sending an HTTP response. \n" ;
30
+ },
31
+ function () {
32
+ echo "Report runner connection completed. \n" ;
33
+ }
34
+ );
16
35
};
17
36
18
37
$ runIndividualTest = function ($ case , $ timeout = 60000 ) {
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+ set -x
3
+
4
+ echo " Running $0 "
5
+
6
+ echo Adding " $1 host.ratchet.internal" to /etc/hosts file
7
+
8
+ echo $1 host.ratchet.internal >> /etc/hosts
9
+
10
+ echo /etc/hosts contains:
11
+ cat /etc/hosts
12
+ echo
Original file line number Diff line number Diff line change 4
4
5
5
"servers" : [
6
6
{"agent" : " RxWebsocketServer/0.0.0" ,
7
- "url" : " ws://localhost :9001" ,
7
+ "url" : " ws://host.ratchet.internal :9001" ,
8
8
"options" : {"version" : 18 }}
9
9
],
10
10
"cases" : [" *" ],
Original file line number Diff line number Diff line change 1
- cd test/ab
1
+ cd test/ab || exit
2
2
3
- wstest -m fuzzingserver -s fuzzingserver.json &
3
+ docker run --rm \
4
+ -d \
5
+ -v ${PWD} :/config \
6
+ -v ${PWD} /reports:/reports \
7
+ -p 9001:9001 \
8
+ --name fuzzingserver \
9
+ crossbario/autobahn-testsuite wstest -m fuzzingserver -s /config/fuzzingserver.json
4
10
sleep 5
5
- php clientRunner.php
11
+
12
+ php -d memory_limit=256M clientRunner.php
13
+
14
+ docker ps -a
15
+
16
+ docker logs fuzzingserver
17
+
18
+ docker stop fuzzingserver
6
19
7
20
sleep 2
8
21
9
- php testServer.php 600 &
22
+
23
+ php -d memory_limit=256M testServer.php &
24
+ SERVER_PID=$!
10
25
sleep 3
11
- wstest -m fuzzingclient -s fuzzingclient.json
12
- sleep 12
26
+
27
+ if [ " $OSTYPE " = " linux-gnu" ]; then
28
+ IPADDR=` hostname -I | cut -f 1 -d ' ' `
29
+ else
30
+ IPADDR=` ifconfig | grep " inet " | grep -Fv 127.0.0.1 | awk ' {print $2}' | head -1 | tr -d ' adr:' `
31
+ fi
32
+
33
+ docker run --rm \
34
+ -it \
35
+ -v ${PWD} :/config \
36
+ -v ${PWD} /reports:/reports \
37
+ --name fuzzingclient \
38
+ crossbario/autobahn-testsuite /bin/sh -c " sh /config/docker_bootstrap.sh $IPADDR ; wstest -m fuzzingclient -s /config/fuzzingclient.json"
39
+ sleep 1
40
+
41
+ kill $SERVER_PID
42
+
43
+ # wstest -m fuzzingserver -s fuzzingserver.json &
44
+ # sleep 5
45
+ # php clientRunner.php
46
+ #
47
+ # sleep 2
48
+
49
+ # php testServer.php 600 &
50
+ # sleep 3
51
+ # wstest -m fuzzingclient -s fuzzingclient.json
52
+ # sleep 12
Original file line number Diff line number Diff line change 11
11
$ timerObservable = Observable::timer (1000 * $ argv [1 ]);
12
12
}
13
13
14
- $ server = new \Rx \Websocket \Server ("tcp://127 .0.0.1 :9001 " , true );
14
+ $ server = new \Rx \Websocket \Server ("tcp://0 .0.0.0 :9001 " , true );
15
15
16
16
$ server
17
17
->takeUntil ($ timerObservable )
You can’t perform that action at this time.
0 commit comments