Issue 33921: Explain that '' can be used to bind to all interfaces for the AF_INET address family in the docs (original) (raw)
Issue33921
Created on 2018-06-20 22:56 by John Hagen, last changed 2022-04-11 14:59 by admin. This issue is now closed.
Pull Requests | |||
---|---|---|---|
URL | Status | Linked | Edit |
PR 7877 | merged | python-dev,2018-06-23 14:54 | |
PR 8513 | merged | miss-islington,2018-07-28 10:03 | |
PR 8514 | merged | miss-islington,2018-07-28 10:04 |
Messages (7) | ||
---|---|---|
msg320125 - (view) | Author: John Hagen (John Hagen) * | Date: 2018-06-20 22:56 |
The socket documentation (https://docs.python.org/3/library/socket.html#socket-families) does not list '' as a way to bind to all interfaces for the AF_INET/AF_INET6 address family. This is answered on SO here: https://stackoverflow.com/a/8034146 but it took me a while to find it. Ideally if this was mentioned in the docs, that would be great. | ||
msg320159 - (view) | Author: Ammar Askar (ammar2) * ![]() |
Date: 2018-06-21 11:01 |
It's kinda mentioned: "For IPv4 addresses, two special forms are accepted instead of a host address: the empty string represents INADDR_ANY" Though it could be more explicit on what means since binding to all interfaces is a common use case. | ||
msg320165 - (view) | Author: John Hagen (John Hagen) * | Date: 2018-06-21 11:15 |
@ammar2 I see that now. Yeah it's further down in the docs and doesn't actually call out '' like is done for AF_CAN: A tuple (interface, ) is used for the AF_CAN address family, where interface is a string representing a network interface name like 'can0'. The network interface name '' can be used to receive packets from all network interfaces of this family. Ideally I think putting something in this section would be helpful: A pair (host, port) is used for the AF_INET address family, where host is a string representing either a hostname in Internet domain notation like 'daring.cwi.nl' or an IPv4 address like '100.50.200.5', and port is an integer. | ||
msg320256 - (view) | Author: Ned Deily (ned.deily) * ![]() |
Date: 2018-06-22 19:33 |
John, since you raised the issue, would you like to provide a doc PR? | ||
msg322536 - (view) | Author: Christian Heimes (christian.heimes) * ![]() |
Date: 2018-07-28 10:03 |
New changeset 95dfb9c3aefdc981d23af700b753a6c97159ccad by Christian Heimes (johnthagen) in branch 'master': bpo-33921: Clarify how to bind to all interfaces using socket (GH-7877) https://github.com/python/cpython/commit/95dfb9c3aefdc981d23af700b753a6c97159ccad | ||
msg322548 - (view) | Author: miss-islington (miss-islington) | Date: 2018-07-28 12:27 |
New changeset 23355445625b8b41030dbda9decaf2f4aa7035a6 by Miss Islington (bot) in branch '3.7': bpo-33921: Clarify how to bind to all interfaces using socket (GH-7877) https://github.com/python/cpython/commit/23355445625b8b41030dbda9decaf2f4aa7035a6 | ||
msg322549 - (view) | Author: miss-islington (miss-islington) | Date: 2018-07-28 12:27 |
New changeset 30f295b85ece2dc2b2b65018bd15090efa1de7dc by Miss Islington (bot) in branch '3.6': bpo-33921: Clarify how to bind to all interfaces using socket (GH-7877) https://github.com/python/cpython/commit/30f295b85ece2dc2b2b65018bd15090efa1de7dc |
History | |||
---|---|---|---|
Date | User | Action | Args |
2022-04-11 14:59:02 | admin | set | github: 78102 |
2018-07-28 12:30:05 | steve.dower | set | status: open -> closedresolution: fixedstage: patch review -> resolved |
2018-07-28 12:27:30 | miss-islington | set | messages: + |
2018-07-28 12:27:18 | miss-islington | set | nosy: + miss-islingtonmessages: + |
2018-07-28 10:04:32 | miss-islington | set | pull_requests: + <pull%5Frequest8031> |
2018-07-28 10:03:33 | miss-islington | set | pull_requests: + <pull%5Frequest8030> |
2018-07-28 10:03:26 | christian.heimes | set | nosy: + christian.heimesmessages: + |
2018-06-23 14:54:23 | python-dev | set | keywords: + patchstage: needs patch -> patch reviewpull_requests: + <pull%5Frequest7484> |
2018-06-22 19:33:59 | ned.deily | set | versions: - Python 3.5nosy: + ned.deilymessages: + keywords: + easystage: needs patch |
2018-06-21 11:15:46 | John Hagen | set | messages: + |
2018-06-21 11:01:12 | ammar2 | set | nosy: + ammar2messages: + |
2018-06-20 22:56:35 | John Hagen | create |