diff options
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> |