(self)
return self._peer_address
Peer endpoint address as a tuple
Peer endpoint address as a tuple
Peer endpoint address as a tuple
def peer_address(self):
        """
        Peer endpoint address as a tuple
        """
        if not self._peer_address:
            self._peer_address = self.sock.getpeername()
            if len(self._peer_address) == 4:
                self._peer_address = self._peer_address[:2]
        return self._peer_address
def peer_address ( self ) : if not self . _peer_address : self . _peer_address = self . sock . getpeername ( ) if len ( self . _peer_address ) == 4 : self . _peer_address = self . _peer_address [ : 2 ] return self . _peer_address