Skip to content

Instantly share code, notes, and snippets.

@thebadger412
Created December 29, 2012 19:36
Show Gist options
  • Save thebadger412/4408877 to your computer and use it in GitHub Desktop.
Save thebadger412/4408877 to your computer and use it in GitHub Desktop.
var socket = io.connect('http://your ip address here..');
socket.on('connected', function(data) {
console.log('Connected, this is what I received : ', data);
//you could then emit something here for the server to receive like socket.emit("blah", "helloworld") -hello world is a string of data you are passing the sever here..
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment