diff options
Diffstat (limited to 'assets/php/vendor/cboden/ratchet/tests/autobahn')
4 files changed, 75 insertions, 0 deletions
diff --git a/assets/php/vendor/cboden/ratchet/tests/autobahn/bin/fuzzingserver.php b/assets/php/vendor/cboden/ratchet/tests/autobahn/bin/fuzzingserver.php new file mode 100644 index 0000000..66d3704 --- /dev/null +++ b/assets/php/vendor/cboden/ratchet/tests/autobahn/bin/fuzzingserver.php @@ -0,0 +1,36 @@ +<?php +use Ratchet\ConnectionInterface; + + require dirname(dirname(dirname(__DIR__))) . '/vendor/autoload.php'; + +class BinaryEcho implements \Ratchet\WebSocket\MessageComponentInterface { + public function onMessage(ConnectionInterface $from, \Ratchet\RFC6455\Messaging\MessageInterface $msg) { + $from->send($msg); + } + + public function onOpen(ConnectionInterface $conn) { + } + + public function onClose(ConnectionInterface $conn) { + } + + public function onError(ConnectionInterface $conn, \Exception $e) { + } +} + + $port = $argc > 1 ? $argv[1] : 8000; + $impl = sprintf('React\EventLoop\%sLoop', $argc > 2 ? $argv[2] : 'StreamSelect'); + + $loop = new $impl; + $sock = new React\Socket\Server('0.0.0.0:' . $port, $loop); + + $wsServer = new Ratchet\WebSocket\WsServer(new BinaryEcho); + // This is enabled to test https://github.com/ratchetphp/Ratchet/issues/430 + // The time is left at 10 minutes so that it will not try to every ping anything + // This causes the Ratchet server to crash on test 2.7 + $wsServer->enableKeepAlive($loop, 600); + + $app = new Ratchet\Http\HttpServer($wsServer); + + $server = new Ratchet\Server\IoServer($app, $sock, $loop); + $server->run(); diff --git a/assets/php/vendor/cboden/ratchet/tests/autobahn/fuzzingclient-all.json b/assets/php/vendor/cboden/ratchet/tests/autobahn/fuzzingclient-all.json new file mode 100644 index 0000000..0494cf3 --- /dev/null +++ b/assets/php/vendor/cboden/ratchet/tests/autobahn/fuzzingclient-all.json @@ -0,0 +1,15 @@ +{ + "options": {"failByDrop": false} + , "outdir": "reports/ab" + + , "servers": [ + {"agent": "Ratchet/0.4 libevent", "url": "ws://localhost:8001", "options": {"version": 18}} + , {"agent": "Ratchet/0.4 libev", "url": "ws://localhost:8004", "options": {"version": 18}} + , {"agent": "Ratchet/0.4 streams", "url": "ws://localhost:8002", "options": {"version": 18}} + , {"agent": "AutobahnTestSuite/0.5.9", "url": "ws://localhost:8000", "options": {"version": 18}} + ] + + , "cases": ["*"] + , "exclude-cases": [] + , "exclude-agent-cases": {} +} diff --git a/assets/php/vendor/cboden/ratchet/tests/autobahn/fuzzingclient-profile.json b/assets/php/vendor/cboden/ratchet/tests/autobahn/fuzzingclient-profile.json new file mode 100644 index 0000000..e81a9fd --- /dev/null +++ b/assets/php/vendor/cboden/ratchet/tests/autobahn/fuzzingclient-profile.json @@ -0,0 +1,12 @@ +{ + "options": {"failByDrop": false} + , "outdir": "reports/profile" + + , "servers": [ + {"agent": "Ratchet", "url": "ws://localhost:8000", "options": {"version": 18}} + ] + + , "cases": ["9.7.4"] + , "exclude-cases": ["1.2.*", "2.3", "2.4", "2.6", "9.2.*", "9.4.*", "9.6.*", "9.8.*"] + , "exclude-agent-cases": {} +} diff --git a/assets/php/vendor/cboden/ratchet/tests/autobahn/fuzzingclient-quick.json b/assets/php/vendor/cboden/ratchet/tests/autobahn/fuzzingclient-quick.json new file mode 100644 index 0000000..c92e805 --- /dev/null +++ b/assets/php/vendor/cboden/ratchet/tests/autobahn/fuzzingclient-quick.json @@ -0,0 +1,12 @@ +{ + "options": {"failByDrop": false} + , "outdir": "reports/rfc" + + , "servers": [ + {"agent": "Ratchet", "url": "ws://localhost:8000", "options": {"version": 18}} + ] + + , "cases": ["*"] + , "exclude-cases": [] + , "exclude-agent-cases": {} +} |