Пример #1
0
 def __init__ (self, my_addr, other_addr, sock=None):
     self.last_packet = 0
     if sock is not None:
         self.direction = 'incoming'
     else:
         self.direction = 'outgoing'
     self.waiting = {}
     self.known = set()
     self.kick_download = None
     self.other_name = ''
     BaseConnection.__init__ (self, my_addr, other_addr, sock)
Пример #2
0
 def __init__(self, my_addr, other_addr, sock=None):
     self.last_packet = 0
     if sock is not None:
         self.direction = 'incoming'
     else:
         self.direction = 'outgoing'
     self.waiting = {}
     self.known = set()
     self.kick_download = None
     self.other_name = ''
     BaseConnection.__init__(self, my_addr, other_addr, sock)
Пример #3
0
 def do_command (self, cmd, data):
     if self.waiting.has_key (cmd):
         self.waiting[cmd].wake_all ((cmd, data))
     BaseConnection.do_command (self, cmd, data)
Пример #4
0
 def __init__ (self, G, my_addr, other_addr):
     BaseConnection.__init__ (self, my_addr, other_addr, verbose=G.verbose)
     self.waiting = {}
Пример #5
0
 def __init__ (self, G, my_addr, other_addr):
     BaseConnection.__init__ (self, my_addr, other_addr)
     self.seen_blocks = set()
     self.seen_txns = set()
     if G.args.txns:
         self.relay = True