Exemple #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")
Exemple #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 = []
Exemple #3
0
 def __init__(self, *a, **k):
     SocketEventMixin.__init__(self)
     common.TimeoutSocketOne.__init__(self, *a, **k)
Exemple #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 = []