Python socket bind to any IP?

后端 未结 3 1181
Happy的楠姐
Happy的楠姐 2020-12-03 06:49

I have a small one sided message sender that works while I specify the IP to connect to in code, however, I am having trouble allowing the socket to accept connections from

3条回答
  •  余生分开走
    2020-12-03 07:20

    Binding to '' has the same effect as to '0.0.0.0' makes the transition to IPv6 easier.

    Depending on the OS, opening a socket.AF_INET6 socket listens to IPv4 and IPv6.

提交回复
热议问题