def setTargetAddress(self, addr): """ <method internal="yes"> <summary> Set the target server address. </summary> <description> <para> This is a compatibility function for proxies that override the routed target. </para> </description> <metainfo> <arguments> <argument maturity="stable"> <name>addr</name> <type></type> <description>Server address</description> </argument> </arguments> </metainfo> </method> """ # NOTE: handling SockAddr types is a compatibility hack, as # proxies might call setServer with a SockAddr instance # instead of a tuple of SockAddrs if isinstance(addr, SockAddrType): self.target_address = (addr,) else: self.target_address = addr self.target_zone = [] for a in self.target_address: self.target_zone.append(root_zone.findZone(a))
def setServerAddress(self, addr): self.server_address = addr self.server_zone = root_zone.findZone(addr)
def setClientAddress(self, addr): self.client_address = addr self.client_zone = root_zone.findZone(addr)