Created
June 13, 2012 18:19
-
-
Save j4rs/2925625 to your computer and use it in GitHub Desktop.
Native Web Socket Client
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://server:9876"); | |
ws.onopen = function() { ... }; | |
ws.onerror = function() { ... }; | |
ws.onclose = function() { ... }; | |
ws.onmessage = function(event) { event.data }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment