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