Exemplo n.º 1
0
class RPCServerThread(threading.Thread):

    daemon = True
    parent = None
    addresses = None
    
    def __init__(self, parent, addresses):
        self.parent = parent
        self.addresses = addresses
        super(RPCServerThread, self).__init__()
        self.rpc_server = Server(
            methods=SpottedRpcMethods(self.parent))

    def run(self):
        for address in self.addresses:
            self.rpc_server.bind(address)
        self.rpc_server.run()
Exemplo n.º 2
0
 def __init__(self, parent, addresses):
     self.parent = parent
     self.addresses = addresses
     super(RPCServerThread, self).__init__()
     self.rpc_server = Server(
         methods=SpottedRpcMethods(self.parent))