Add autobahn test suite echo server.

This commit is contained in:
Thomas Hintz 2014-10-08 17:20:57 -07:00
parent fb9d35db77
commit de406f1151
2 changed files with 33 additions and 0 deletions

23
test/echo-server.scm Normal file
View File

@ -0,0 +1,23 @@
(import chicken scheme posix)
(use spiffy websockets)
(ping-interval 0)
(drop-incoming-pings #f)
(propagate-common-errors #f)
(handle-not-found
(lambda (path)
(with-websocket
(lambda ()
(let loop ()
(receive (data type) (receive-message)
(unless (eq? type 'connection-close)
(send-message type data)
(loop))))))))
(debug-log (current-output-port))
(root-path ".")
(server-port 8080)
(start-server)

10
test/ws-test.spec Normal file
View File

@ -0,0 +1,10 @@
{
"servers": [
{"agent": "AutobahnServer",
"url": "ws://localhost:8080/web-socket",
"options": {"version": 13}}
],
"cases": ["1.*", "2.*", "3.*", "4.*", "5.*"],
"exclude-cases": [],
"exclude-agent-cases": {}
}