def _GetProxyClient(self, address):
"""Gets a proxy client for a given client address.
Returns the new proxy client, or an existing one if the address has been
used before.
"""
if address in self.proxy_clients:
proxy_client = self.proxy_clients[address]
else:
proxy_client = ProxyClient(self, address)
self.proxy_clients[address] = proxy_client
reactor.listenUDP(0, proxy_client.udp)
return proxy_client
评论列表
文章目录