This commit is contained in:
Thomas FORGIONE 2015-07-02 15:33:13 +02:00
parent 8fe0dec4d6
commit 95733b2fc7
2 changed files with 8 additions and 4 deletions

View File

@ -35,9 +35,13 @@ app.use(bodyParser.urlencoded({ extended: false }));
app.use(bodyParser.json());
app.use(function(req, res, next) {
// Log connection
console.dir(req.headers)
console.log('[REQ] ' + new Date() + ' ' + req.headers['X-Forwarded-For'] + ' : ' + req.url);
console.log(
'[REQ] ' + new Date() + ' ' +
(req.headers['x-forwarded-for'] || req.connection.remoteAddress) +
' : ' + req.url
);
res.locals.title = "3DUI";
res.locals.urls = urls;

View File

@ -4,10 +4,10 @@ var geo = require('./lib/geo.min.js');
module.exports = function(io) {
io.on('connection', function(socket) {
console.log('[SOK] ' + new Date() + ' ' + socket.conn.remoteAddress + ' connection');
console.log('[SOK] ' + new Date() + ' ' + socket.handshake.address + ' connection');
socket.on('disconnect', function() {
console.log('[SOK] ' + new Date() + ' ' + socket.conn.remoteAddress + ' disconnect');
console.log('[SOK] ' + new Date() + ' ' + socket.handshake.address + ' disconnect');
});
var streamer = new geo.MeshStreamer();