- 下载xmlrpc-c-1.51.05.tgz
百度网盘:https://pan.baidu.com/s/1eZU0ShRI-x84SKbhbXUg0w - 编译服务端并运行:
tar xvf tar xvf xmlrpc-c-1.51.05.tgz
cd xmlrpc-c-1.51.05/
./configure
make
cd examples/
make
cd cpp
./xmlrpc_sample_add_server
客户端python脚本
# _*_ coding:utf-8 _*_
from xmlrpc.client import ServerProxy
import xmlrpc.client
if __name__ == '__main__':
server = ServerProxy("http://localhost:8080", allow_none=True)
print(server.system.listMethods())
print (server.sample.add(9, 8))