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