Skip to content

Instantly share code, notes, and snippets.

@raulp
Created December 30, 2013 04:20
Show Gist options
  • Save raulp/8177748 to your computer and use it in GitHub Desktop.
Save raulp/8177748 to your computer and use it in GitHub Desktop.
<script src="http://localhost:3000/socket.io/socket.io.js"></script>
<script>
var news = io.connect('http://localhost:3000/news');
news.on('connect', function(socket) {
news.emit("raul", new Array("1","2","3","4","5","6","7","8","9","10") );
news.on('get_random_number_from_raul', function(data) {
console.log(data);
});
news.emit("createroom","x");
news.of("x").on("created",function(data) {
console.log(data);
});
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment