var count = 0;
var app = express();
http.createServer(app).listen(8080)
.on('connection', function(socket) {
count++;
socket.on('close', function () {
count--;
})
});
function getConnectionsCount () {
return count;
}
var app = express();
var server = http.createServer(app).listen(8080);
server.getConnections(function (err, count) {
});