Exemplo n.º 1
0
    def __init__(self, hosts_bytestreams, from_, to_):
        SocketEventMixin.__init__(self)
        self.log = logging.getLogger('S5BOutgoingSocket')
        self.log.warning('S5BOutgoingSocket')

        shosts = hosts_bytestreams.hosts
        self.addys = [(host.host, host.port) for host in shosts]
        self.sid = hosts_bytestreams.sid
        self.hash = sha1(self.sid + from_.as_utf8() + to_.as_utf8()).hexdigest()

        self.t = TimeoutSocketMulti()

        self._on_failure = lambda: self.event("connection_failed")
Exemplo n.º 2
0
 def __init__(self, *a, **k):
     common.TimeoutSocketOne.__init__(self, *a, **k)
     SocketEventMixin.__init__(self)
     self.data = ''
     self.original_collector = self.collect_incoming_data
     self.collectors = []
Exemplo n.º 3
0
 def __init__(self, *a, **k):
     SocketEventMixin.__init__(self)
     common.TimeoutSocketOne.__init__(self, *a, **k)
Exemplo n.º 4
0
 def __init__(self, *a, **k):
     common.TimeoutSocketOne.__init__(self, *a, **k)
     SocketEventMixin.__init__(self)
     self.data = ''
     self.original_collector = self.collect_incoming_data
     self.collectors = []