function startSocketServer() {
    app = http.createServer();
    io = require("socket.io").listen(app);
    io.set("origins", "http://localhost:*");

    app.listen(port, function () {
        console.log("listening on *:" + port);
    });

    app.on("error", function (e) {
        console.log("error " + e);
    });
}
/**
 * create socket server on port 3001
 *
 */
create socket server on port 3001
create socket server on port 3001
function startSocketServer() {
    app = http.createServer();
    io = require("socket.io").listen(app);
    io.set("origins", "http://localhost:*");
    app.listen(port, function () {
        console.log("listening on *:" + port);
    });
    app.on("error", function (e) {
        console.log("error " + e);
    });
}
function startSocketServer ( ) { app = http . createServer ( ) ; io = require ( "socket.io" ) . listen ( app ) ; io . set ( "origins" , "http://localhost:*" ) ; app . listen ( port , function ( ) { console . log ( "listening on *:" + port ) ; } ) ; app . on ( "error" , function ( e ) { console . log ( "error " + e ) ; } ) ; }
create socket server on port 3001
create socket server on port 3001