add code to get the ip address from a socket.