Nodejs socketサービス端末はクライアントIPを取得します.
196 ワード
io.sockets.on('connection', function(socket) {
var socketId = socket.id
var clientIp = socket.request.connection.remoteAddress
console.log(clientIp)
})
io.sockets.on('connection', function(socket) {
var socketId = socket.id
var clientIp = socket.request.connection.remoteAddress
console.log(clientIp)
})