i am trying to get the ip address of a remote client using nodejs, socket.io. i read here that it can be done using socket.request.connection.remoteAddress, however, how can i implement this?
and i saw the below code but i get unexpected identifier for var cleint
Var client = require('socket.io').listen(8080).sockets;
client.on('connection',function(socket){
var clientIpAddress= socket.request.socket.remoteAddress;
});