Created
February 22, 2016 14:43
-
-
Save chazcheadle/7343e3a070bc31573b42 to your computer and use it in GitHub Desktop.
websocket connection test
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var ws = new WebSocket("ws://HOST"); | |
| // Display message to confirm a connection has been made. | |
| ws.onopen = function() { | |
| console.log('open'); | |
| }; | |
| ws.onmessage = function (packet) { | |
| console.log(packet.data); | |
| }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment