def listening_port(self):
    if (not self.listening_socket):
        return None
    return self.listening_socket.getsockname()[1]
def listening_port(self):
    if (not self.listening_socket):
        return None
    return self.listening_socket.getsockname()[1]