我正在使用要点https://gist.github.com/sandrogauci/9618007 我想处理第46行上被拒绝的conn,该怎么办?我也想终止客户端conn。
class PortForwarder(asyncio.Protocol):
def __init__(self, dsthost, dstport):
self.dsthost = dsthost
self.dstport = dstport
def connection_made(self, transport):
self.transport = transport
loop = asyncio.get_event_loop()
self.fcon = ForwardedConnection(self.transport)
asyncio.async(loop.create_connection(lambda: self.fcon, self.dsthost, self.dstport))