I'm playing around with socket.io and I'm trying trying to locate the different properties of the socket object on connection.
I've found this answer which showed me the socket.request.connection.remoteAddress property, but when I do a console.log of the socket.request.connection object, the remoteAddress isn't listed as a property..
Why does console.log not list all the properties? Is there a better method to show an object?
var io = require('socket.io').listen(server);
io.sockets.on('connection', function(socket){
console.log(socket.request.connection.remoteAddress); //works
console.log(socket.request.connection); //Doesn't show remoteAddress or remotePort
console.dir(socket.request.connection); //Same problem
});