Answers for "socket io get ip"

1

socket io get ip

var io = require('socket.io').listen(server);

io.sockets.on('connection', function (socket) {
  var address = socket.handshake.address;
  console.log('New connection from ' + address.address + ':' + address.port);
});
Posted by: Guest on July-08-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language