Monday, 15 May 2017

How get the computer name of other users connected in my host? Using Node js program

For example,

my ip address plus the port is : 10.10.125.22:3000 and my computer name is : HOST

and the other user is

ip address plus the port is: 10.10.124.66:3000 and the computer name: CLIENT

i want to know how to call the computer name: CLIENT, when i try using req.headers.host it will display the computer name of the host ("HOST"), i tried this code but it returns to undefined

require('dns').reverse(req.connection.remoteAddress, function(err, domains) {

    console.log(domains);
});

Thanks



via Jc Velasquez

No comments:

Post a Comment