Skip to content

Instantly share code, notes, and snippets.

@Anderson-Juhasc
Last active September 6, 2015 23:57
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save Anderson-Juhasc/062cf6c129e0de406876 to your computer and use it in GitHub Desktop.
Save Anderson-Juhasc/062cf6c129e0de406876 to your computer and use it in GitHub Desktop.
var ws = new WebSocket('wss://url');
ws.on('open', function() {
console.log('open connect');
ws.send("channel or msg");
});
ws.on('message', function(message) {
console.log(message);
});
ws.on('close', function() {
console.log('close connect');
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment