def test_rpyc(self): p1, p2 = PipeStream.create_pair() client = rpyc.connect_stream(p1) server = rpyc.connect_stream(p2) server_thread = rpyc.spawn(server.serve_all) assert client.root.get_service_name() == "VOID" t = rpyc.BgServingThread(client) assert server.root.get_service_name() == "VOID" t.stop() client.close() server.close() server_thread.join()
def setUp(self): self.server = self._get_server() self.server.logger.quiet = True self.server_thread = rpyc.spawn(self.server.start)
def setUp(self): self.pipe_server_thread = rpyc.spawn(self.pipe_server) time.sleep(1) # make sure server is accepting already self.np_client = NamedPipeStream.create_client("floop") self.client = rpyc.connect_stream(self.np_client)
def __init__(self, callback, interval): self.callback = rpyc.async_(callback) self.interval = interval self.active = True self.thread = rpyc.spawn(self.work)