node js socket.io serve pages code example
Example: when 2 emits on a same chatroom at a time only one is working using socket.io
var io = require('socket.io').listen(app);
io.sockets.on('connection', function (socket) { .... });
var io = require('socket.io').listen(app);
io.sockets.on('connection', function (socket) { .... });