Created
May 8, 2014 00:03
-
-
Save endel/2ddc580b6027674fd53a to your computer and use it in GitHub Desktop.
This file contains 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 socket = new WebSocket('ws://127.0.0.1:8889'); | |
socket.onopen = function ( ) { | |
console.log('connection is opened'); | |
return; | |
}; | |
socket.onmessage = function ( msg ) { | |
console.log(msg.data); | |
return; | |
}; | |
socket.onclose = function ( ) { | |
console.log('connection is closed'); | |
return; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment