Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
95dfb9c3
Commit
95dfb9c3
authored
Jul 28, 2018
by
johnthagen
Committed by
Christian Heimes
Jul 28, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bpo-33921: Clarify how to bind to all interfaces using socket (GH-7877)
Clarify how to bind to all interfaces using socket
parent
937fb55d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
6 deletions
+7
-6
Doc/library/socket.rst
Doc/library/socket.rst
+7
-6
No files found.
Doc/library/socket.rst
View file @
95dfb9c3
...
...
@@ -70,6 +70,13 @@ created. Socket addresses are represented as follows:
notation like ``'daring.cwi.nl'`` or an IPv4 address like ``'100.50.200.5'``,
and *port* is an integer.
- For IPv4 addresses, two special forms are accepted instead of a host
address: ``''`` represents :const:`INADDR_ANY`, which is used to bind to all
interfaces, and the string ``'<broadcast>'`` represents
:const:`INADDR_BROADCAST`. This behavior is not compatible with IPv6,
therefore, you may want to avoid these if you intend to support IPv6 with your
Python programs.
- For :const:`AF_INET6` address family, a four-tuple ``(host, port, flowinfo,
scopeid)`` is used, where *flowinfo* and *scopeid* represent the ``sin6_flowinfo``
and ``sin6_scope_id`` members in :const:`struct sockaddr_in6` in C. For
...
...
@@ -171,12 +178,6 @@ created. Socket addresses are represented as follows:
.. XXX document them!
For IPv4 addresses, two special forms are accepted instead of a host address:
the empty string represents :const:`INADDR_ANY`, and the string
``'<broadcast>'`` represents :const:`INADDR_BROADCAST`. This behavior is not
compatible with IPv6, therefore, you may want to avoid these if you intend
to support IPv6 with your Python programs.
If you use a hostname in the *host* portion of IPv4/v6 socket address, the
program may show a nondeterministic behavior, as Python uses the first address
returned from the DNS resolution. The socket address will be resolved
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment