0

When running any of these methods on socket.io

        console.log('Ip:', socket.request.connection);
        console.log('client IP: ',socket.handshake.address);
        console.log('client IP: ',socket.client.conn.remoteAddress);
        console.log('client IP: ',socket.conn.remoteAddress);

They all give me the result: ::ffff:86.228.xx.yy I guess it is a ipv6 result.

I try to store that with mysql INET6_ATON("::ffff:86.228.xx.yy") and this gives me the result of NULL

What is the proper way to store a socket.io IP address into mysql (as INTEGER) ?

Maybe convert that to a proper ipv6 address ?

yarek
  • 11,278
  • 30
  • 120
  • 219

0 Answers0