diff --git a/rpyc/client.py b/rpyc/client.py index 7fde0b3..8309762 100644 --- a/rpyc/client.py +++ b/rpyc/client.py @@ -1,4 +1,4 @@ import rpyc -conn = rpyc.connect('localhost', 18871) -print('Time is {}'.format(conn.root.get_time())) +proxy = rpyc.connect('localhost', 18871, config={'allow_public_attrs':True}) +print('Time is {}'.format(proxy.root.get_time())) diff --git a/rpyc/server.py b/rpyc/server.py index de366a5..5c7a452 100644 --- a/rpyc/server.py +++ b/rpyc/server.py @@ -1,10 +1,10 @@ import time +import rpyc -from rpyc import Service from rpyc.utils.server import ThreadedServer -class TimeService(Service): +class TimeService(rpyc.Service): def exposed_get_time(self): return time.ctime()