Skip to content

Instantly share code, notes, and snippets.

@oroce
Created April 2, 2013 16:23
Show Gist options
  • Save oroce/5293604 to your computer and use it in GitHub Desktop.
Save oroce/5293604 to your computer and use it in GitHub Desktop.
var
express = require("express")
app = express()
sio = require("socket.io"),
server = require('http').createServer(app)
io = sio.listen(server);
server.listen(3333);
io.sockets.on('connection', function (socket) {
io.sockets.clients().forEach(function( s ){
socket.emit( "dummy" );
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment