diff options
author | David Thompson <dthompson2@worcester.edu> | 2015-11-08 17:42:24 -0500 |
---|---|---|
committer | David Thompson <dthompson2@worcester.edu> | 2015-11-08 17:42:24 -0500 |
commit | b6b13dfce0218278597a1429969a7d9d2cd75089 (patch) | |
tree | 071cca20f3de3fcc8a8da0708ede1d905c0d7b82 /test.html | |
parent | c18894ddb3b1dbfb94deea28114bce4967af2119 (diff) |
Add test HTML page.
Diffstat (limited to 'test.html')
-rw-r--r-- | test.html | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/test.html b/test.html new file mode 100644 index 0000000..c8dc987 --- /dev/null +++ b/test.html @@ -0,0 +1,20 @@ +<!DOCTYPE html> +<html> + <body> + <script type="text/javascript"> + var ws = new WebSocket("ws://localhost:9090"); + console.log("initialized websocket"); + ws.onmessage = function(evt) { + console.log("received message:"); + console.log(evt); + }; + ws.onopen = function() { + console.log("connected"); + ws.send("Hello, there!"); + } + ws.onclose = function() { + console.log("closed websocket"); + } + </script> + </body> +</html> |