0

我正在尝试使用 xmlrpc 和 python 3 实现远程对象实现。我已经尝试了http://docs.python.org/3.1/library/xmlrpc.server.html?highlight=xmlrpc#simplexmlrpcserver-example上的示例,但它只适用于本地主机,我怎样才能让它在内部 IP 之间运行?

4

2 回答 2

1

将 localhost 值更新为以下内容:

对于服务器:s = SimpleXMLRPCServer(("ServerIp", 8000))

对于客户:s = xmlrpc.client.ServerProxy("http://ServerIp:8000/")

于 2011-12-07T11:21:36.480 回答
0

也许我误解了您的问题,但是...您是否尝试过在另一台机器上运行服务器代码和客户端代码(将客户端代码第一行中的“localhost”值更改为s = xmlrpc.client.ServerProxy('http://localhost:8000')远程服务器的 IP 地址?

于 2009-10-22T22:27:23.390 回答