Example #1
0
 def __init__(self, node_proto, router):
     self.router = router
     RPCProtocol.__init__(self, node_proto, router)
     self.log = Logger(system=self)
     self.handled_commands = [GET_CONTRACT, GET_IMAGE]
     self.multiplexer = None
     self.hashmap = HashMap()
Example #2
0
 def __init__(self, sourceNode, storage, ksize):
     self.ksize = ksize
     self.router = RoutingTable(self, ksize, sourceNode)
     self.storage = storage
     self.sourceNode = sourceNode
     self.multiplexer = None
     self.log = Logger(system=self)
     self.handled_commands = [PING, STUN, STORE, DELETE, FIND_NODE, FIND_VALUE]
     RPCProtocol.__init__(self, sourceNode.getProto(), self.router)
Example #3
0
 def __init__(self, sourceNode, storage, ksize):
     self.ksize = ksize
     self.router = RoutingTable(self, ksize, sourceNode)
     self.storage = storage
     self.sourceNode = sourceNode
     self.multiplexer = None
     self.log = Logger(system=self)
     self.handled_commands = [
         PING, STUN, STORE, DELETE, FIND_NODE, FIND_VALUE, HOLE_PUNCH
     ]
     RPCProtocol.__init__(self, sourceNode.getProto(), self.router)
Example #4
0
 def __init__(self, node_proto, router, signing_key):
     self.router = router
     RPCProtocol.__init__(self, node_proto, router)
     self.log = Logger(system=self)
     self.multiplexer = None
     self.hashmap = HashMap()
     self.signing_key = signing_key
     self.listeners = []
     self.handled_commands = [GET_CONTRACT, GET_IMAGE, GET_PROFILE, GET_LISTINGS, GET_USER_METADATA,
                              GET_CONTRACT_METADATA, FOLLOW, UNFOLLOW, GET_FOLLOWERS, GET_FOLLOWING,
                              NOTIFY, MESSAGE]
Example #5
0
 def __init__(self, node_proto, router, signing_key, database):
     self.router = router
     RPCProtocol.__init__(self, node_proto, router)
     self.log = Logger(system=self)
     self.multiplexer = None
     self.db = database
     self.signing_key = signing_key
     self.listeners = []
     self.handled_commands = [GET_CONTRACT, GET_IMAGE, GET_PROFILE, GET_LISTINGS, GET_USER_METADATA,
                              GET_CONTRACT_METADATA, FOLLOW, UNFOLLOW, GET_FOLLOWERS, GET_FOLLOWING,
                              NOTIFY, MESSAGE, ORDER, ORDER_CONFIRMATION, COMPLETE_ORDER]
Example #6
0
 def __init__(self, node_proto, router, signing_key):
     self.router = router
     RPCProtocol.__init__(self, node_proto, router)
     self.log = Logger(system=self)
     self.multiplexer = None
     self.hashmap = HashMap()
     self.signing_key = signing_key
     self.listeners = []
     self.handled_commands = [
         GET_CONTRACT, GET_IMAGE, GET_PROFILE, GET_LISTINGS,
         GET_USER_METADATA, GET_CONTRACT_METADATA, FOLLOW, UNFOLLOW,
         GET_FOLLOWERS, GET_FOLLOWING, NOTIFY, MESSAGE
     ]
Example #7
0
 def __init__(self, node_proto, router):
     self.router = router
     RPCProtocol.__init__(self, node_proto, router)
     self.log = Logger(system=self)
     self.handled_commands = [GET_CONTRACT]