Skip to content

bpo-45693: Document port parameter to loop.create_server #29760

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 24, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions Doc/library/asyncio-eventloop.rst
Original file line number Diff line number Diff line change
Expand Up @@ -631,6 +631,11 @@ Creating network servers
assumed and a list of multiple sockets will be returned (most likely
one for IPv4 and another one for IPv6).

* The *port* parameter can be set to specify which port the server should
listen on. If ``0`` or ``None`` (the default), a random unused port will
be selected (note that if *host* resolves to multiple network interfaces,
a different random port will be selected for each interface).

* *family* can be set to either :data:`socket.AF_INET` or
:data:`~socket.AF_INET6` to force the socket to use IPv4 or IPv6.
If not set, the *family* will be determined from host name
Expand Down