socket.getpeername [method]

socket.getpeername()

return the host name of the device on the other end of the socket, if it's connected