简体   繁体   English

Python Multiprocessing Listener 0.0.0.0 Windows文档

[英]Python multiprocessing Listener 0.0.0.0 Windows documentation

In the Python 2.7.5 documentation on multiprocessing.connection.Listener ( link ), it states that multiprocessing.connection.Listenerlink )的Python 2.7.5文档中,它指出

Note If an address of '0.0.0.0' is used, the address will not be a connectable end point on Windows. 注意如果使用的地址为“ 0.0.0.0”,则该地址在Windows上将不是可连接的端点。 If you require a connectable end-point, you should use '127.0.0.1'. 如果需要可连接的端点,则应使用“ 127.0.0.1”。

What precisely does this mean, in the context of: 在以下情况下,这到底是什么意思:

  • I have tested the Client ( conn=Client(('localhost', port)) ) and Listener ( listener=Listener(('0.0.0.0', port)) ) on the same machine and communication works. 我已经在同一台机器上测试了Clientconn=Client(('localhost', port)) )和Listenerlistener=Listener(('0.0.0.0', port)) ),并且通讯正常。
  • I have tested it with client and listener on different machines (where the listener was created with 0.0.0.0 , and the client was given the IP address of the listener machine) and communication works. 我已经在不同的机器上(使用0.0.0.0创建监听器,并且为客户端提供了监听器计算机的IP地址)在客户端和监听器上对其进行了测试。

According to the discussion for issue 3270 , that text was added to the documentation merely to indicate that the specific address 0.0.0.0 could not be used as a connectable end-point , as it might be used from a client. 根据对问题3270的讨论,将该文本添加到文档中只是为了表明特定地址0.0.0.0不能用作可连接的端点 ,因为它可以从客户端使用。 As such, @Blckknght's comment above was pretty much correct. 因此,@ Blckknght的上述评论非常正确。

The note was added to the documentation here . 该注释已添加到此处的文档中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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