简体   繁体   中英

How to start an rpyc server?

I recently installed rpyc on my Ubuntu 14.04 Virtual machine using:

pip install rpyc

i cannot find the file which can be used to start the server. I have looked in many places but to no avail.

It is simply rpyc_classic.py from the comand line:

$ rpyc_classic.py 
INFO:SLAVE/18812:server started on [0.0.0.0]:18812

Then connect:

from rpyc import classic

c = classic.connect("0.0.0.0",port=18812)

print(c.modules.sys.platform)
linux

You will see the connection in your shell:

INFO:SLAVE/18812:accepted 127.0.0.1:58217
INFO:SLAVE/18812:welcome [127.0.0.1]:58217

The example is in the pypi documentation

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM