@@ -397,11 +397,11 @@ Opening network connections
397
397
Open a streaming transport connection to a given
398
398
address specified by *host * and *port *.
399
399
400
- The socket family can be either :py:data : `~socket.AF_INET ` or
401
- :py:data : `~socket.AF_INET6 ` depending on *host * (or the *family *
400
+ The socket family can be either :py:const : `~socket.AF_INET ` or
401
+ :py:const : `~socket.AF_INET6 ` depending on *host * (or the *family *
402
402
argument, if provided).
403
403
404
- The socket type will be :py:data : `~socket.SOCK_STREAM `.
404
+ The socket type will be :py:const : `~socket.SOCK_STREAM `.
405
405
406
406
*protocol_factory * must be a callable returning an
407
407
:ref: `asyncio protocol <asyncio-protocol >` implementation.
@@ -495,7 +495,7 @@ Opening network connections
495
495
496
496
.. versionchanged :: 3.6
497
497
498
- The socket option :py:data : `~socket.TCP_NODELAY ` is set by default
498
+ The socket option :py:const : `
38BA
~socket.TCP_NODELAY ` is set by default
499
499
for all TCP connections.
500
500
501
501
.. versionchanged :: 3.7
@@ -535,11 +535,11 @@ Opening network connections
535
535
536
536
Create a datagram connection.
537
537
538
- The socket family can be either :py:data : `~socket.AF_INET `,
539
- :py:data : `~socket.AF_INET6 `, or :py:data : `~socket.AF_UNIX `,
538
+ The socket family can be either :py:const : `~socket.AF_INET `,
539
+ :py:const : `~socket.AF_INET6 `, or :py:const : `~socket.AF_UNIX `,
540
540
depending on *host * (or the *family * argument, if provided).
541
541
542
- The socket type will be :py:data : `~socket.SOCK_DGRAM `.
542
+ The socket type will be :py:const : `~socket.SOCK_DGRAM `.
543
543
544
544
*protocol_factory * must be a callable returning a
545
545
:ref: `protocol <asyncio-protocol >` implementation.
@@ -564,7 +564,7 @@ Opening network connections
564
564
* *reuse_port * tells the kernel to allow this endpoint to be bound to the
565
565
same port as other existing endpoints are bound to, so long as they all
566
566
set this flag when being created. This option is not supported on Windows
567
- and some Unixes. If the :py:data : `~socket.SO_REUSEPORT ` constant is not
567
+ and some Unixes. If the :py:const : `~socket.SO_REUSEPORT ` constant is not
568
568
defined then this capability is unsupported.
569
569
570
570
* *allow_broadcast * tells the kernel to allow this endpoint to send
@@ -590,7 +590,7 @@ Opening network connections
590
590
591
591
.. versionchanged :: 3.8.1
592
592
The *reuse_address * parameter is no longer supported, as using
593
- :py:data : `~sockets.SO_REUSEADDR ` poses a significant security concern for
593
+ :py:const : `~sockets.SO_REUSEADDR ` poses a significant security concern for
594
594
UDP. Explicitly passing ``reuse_address=True `` will raise an exception.
595
595
596
596
When multiple processes with differing UIDs assign sockets to an
@@ -599,7 +599,7 @@ Opening network connections
599
599
600
600
For supported platforms, *reuse_port * can be used as a replacement for
601
601
similar functionality. With *reuse_port *,
602
- :py:data : `~sockets.SO_REUSEPORT ` is used instead, which specifically
602
+ :py:const : `~sockets.SO_REUSEPORT ` is used instead, which specifically
603
603
prevents processes with differing UIDs from assigning sockets to the same
604
604
socket address.
605
605
@@ -617,8 +617,8 @@ Opening network connections
617
617
618
618
Create a Unix connection.
619
619
620
- The socket family will be :py:data : `~socket.AF_UNIX `; socket
621
- type will be :py:data : `~socket.SOCK_STREAM `.
620
+ The socket family will be :py:const : `~socket.AF_UNIX `; socket
621
+ type will be :py:const : `~socket.SOCK_STREAM `.
622
622
623
623
A tuple of ``(transport, protocol) `` is returned on success.
624
624
@@ -654,7 +654,7 @@ Creating network servers
654
654
ssl_shutdown_timeout=None, \
655
655
start_serving=True)
656
656
657
- Create a TCP server (socket type :data : `~socket.SOCK_STREAM `) listening
657
+ Create a TCP server (socket type :const : `~socket.SOCK_STREAM `) listening
658
658
on *port * of the *host * address.
659
659
660
660
Returns a :class: `Server ` object.
@@ -682,10 +682,10 @@ Creating network servers
682
682
be selected (note that if *host * resolves to multiple network interfaces,
683
683
a different random port will be selected for each interface).
684
684
685
- * *family * can be set to either :data : `socket.AF_INET ` or
686
- :data : `~socket.AF_INET6 ` to force the socket to use IPv4 or IPv6.
685
+ * *family * can be set to either :const : `socket.AF_INET ` or
686
+ :const : `~socket.AF_INET6 ` to force the socket to use IPv4 or IPv6.
687
687
If not set, the *family * will be determined from host name
688
- (defaults to :data : `~socket.AF_UNSPEC `).
688
+ (defaults to :const : `~socket.AF_UNSPEC `).
689
689
690
690
* *flags * is a bitmask for :meth: `getaddrinfo `.
691
691
@@ -739,7 +739,7 @@ Creating network servers
739
739
.. versionchanged :: 3.6
740
740
741
741
Added *ssl_handshake_timeout * and *start_serving * parameters.
742
- The socket option :py:data : `~socket.TCP_NODELAY ` is set by default
742
+ The socket option :py:const : `~socket.TCP_NODELAY ` is set by default
743
743
for all TCP connections.
744
744
745
745
.. versionchanged :: 3.11
@@ -760,7 +760,7 @@ Creating network servers
760
760
start_serving=True)
761
761
762
762
Similar to :meth: `loop.create_server ` but works with the
763
- :py:data : `~socket.AF_UNIX ` socket family.
763
+ :py:const : `~socket.AF_UNIX ` socket family.
764
764
765
765
*path * is the name of a Unix domain socket, and is required,
766
766
unless a *sock * argument is provided. Abstract Unix sockets,
0 commit comments