from SimpleXMLRPCServer import SimpleXMLRPCServer
def msg(s):
print s
return True
server = SimpleXMLRPCServer( ("localhost", 8000) )
server.register_function(msg)
server.serve_forever()
对应的客户机程序:
from xmlrpclib import ServerProxy
server = ServerProxy("http://localhost:8000")
while True:
msg = raw_input()
server.msg(msg)
已有 22658 名学员学习以下课程通过考试
最需教育客户端 软件问题一手掌握
去 App Store 免费下载 iOS 客户端
点击加载更多评论>>