コード例 #1
0
ファイル: server.py プロジェクト: githubhjs/caesure
 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
ファイル: chain_puller.py プロジェクト: zhilinwww/caesure
 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
ファイル: chain_puller.py プロジェクト: zhilinwww/caesure
 def __init__ (self, G, my_addr, other_addr):
     BaseConnection.__init__ (self, my_addr, other_addr, verbose=G.verbose)
     self.waiting = {}
コード例 #5
0
ファイル: blockwatch.py プロジェクト: zhilinwww/caesure
 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