Ejemplo n.º 1
0
 def __init__(self, tor_client):
     AsyncoreTcp.__init__(self)
     self.tor_client = tor_client
     self.fwd_addr = fwder
     try:
         self.create_socket(socket.AF_INET, socket.SOCK_STREAM)
         self.connect(self.fwd_addr)
     except socket.error, msg:
         logger.error("cannot connect to forwarder...(%s)" % msg)
         self.teardown()
Ejemplo n.º 2
0
 def __init__(self, socket):
     AsyncoreTcp.__init__(self, socket)
     self.fwder = ForwarderHandler(self)