server:
class A:
@staticmethod
def test_a(n):
return n
class B:
@staticmethod
def test_b(n):
return n * 2
server = zerorpc.Server()
server.register(A(), 'a')
server.register(B(), 'b')
server.bind("tcp://127.0.0.1:80")
server.run()
client:
client = zerorpc.Client()
client.connect("tcp://127.0.0.1:80")
print(client.a.test_a(1))
print(client.b.test_b(2))