title: socket.io how to get server socket listen address and port
body: <p>here is my simplified code example on server side, i need to get to which ip (preferably hostname) and port the server socket is listening, given the socket argument on my callback and assuming i don't have accessible io variable here</p>
  
  <pre><code>function myCallback(socket, data){
      //how do i get, to which ip or hostname and port the socket argument is listening
  }
  
  io.on('connection', function(socket){
       socket.on('event',function(data){
            myCallback(socket,data);
       });
  });
  </code></pre>