@@ -535,6 +535,9 @@ Creating network servers
535
535
536
536
Arguments:
537
537
538
+ * *protocol_factory * must be a callable returning a
539
+ :ref: `protocol <asyncio-protocol >` implementation.
540
+
538
541
* The *host * parameter can be set to several types which determine behavior:
539
542
- If *host * is a string, the TCP server is bound to *host * and *port *.
540
543
- if *host * is a sequence of strings, the TCP server is bound to all
@@ -617,6 +620,9 @@ Creating network servers
617
620
:class: `str `, :class: `bytes `, and :class: `~pathlib.Path ` paths
618
621
are supported.
619
622
623
+ See the documentation of the :meth: `loop.create_server ` method
624
+ for information about arguments to this method.
625
+
620
626
Availability: UNIX.
621
627
622
628
.. versionadded :: 3.7
@@ -637,6 +643,9 @@ Creating network servers
637
643
638
644
Parameters:
639
645
646
+ * *protocol_factory * must be a callable returning a
647
+ :ref: `protocol <asyncio-protocol >` implementation.
648
+
640
649
* *sock * is a preexisting socket object returned from
641
650
:meth: `socket.accept <socket.socket.accept> `.
642
651
@@ -909,7 +918,8 @@ Working with pipes
909
918
*pipe * is a :term: `file-like object <file object> `.
910
919
911
920
Return pair ``(transport, protocol) ``, where *transport * supports
912
- the :class: `ReadTransport ` interface.
921
+ the :class: `ReadTransport ` interface and *protocol * is an object
922
+ instantiated by the *protocol_factory *.
913
923
914
924
With :class: `SelectorEventLoop ` event loop, the *pipe * is set to
915
925
non-blocking mode.
@@ -924,7 +934,8 @@ Working with pipes
924
934
*pipe * is :term: `file-like object <file object> `.
925
935
926
936
Return pair ``(transport, protocol) ``, where *transport * supports
927
- :class: `WriteTransport ` interface.
937
+ :class: `WriteTransport ` interface and *protocol * is an object
938
+ instantiated by the *protocol_factory *.
928
939
929
940
With :class: `SelectorEventLoop ` event loop, the *pipe * is set to
930
941
non-blocking mode.
@@ -1159,7 +1170,8 @@ async/await code consider using high-level convenient
1159
1170
for documentation on other arguments.
1160
1171
1161
1172
Returns a pair of ``(transport, protocol) ``, where *transport *
1162
- conforms to the :class: `asyncio.SubprocessTransport ` base class.
1173
+ conforms to the :class: `asyncio.SubprocessTransport ` base class and
1174
+ *protocol * is an object instantiated by the *protocol_factory *.
1163
1175
1164
1176
.. coroutinemethod :: loop.subprocess_shell(protocol_factory, cmd, \*, \
1165
1177
stdin=subprocess.PIPE, stdout=subprocess.PIPE, \
@@ -1180,7 +1192,8 @@ async/await code consider using high-level convenient
1180
1192
the remaining arguments.
1181
1193
1182
1194
Returns a pair of ``(transport, protocol) ``, where *transport *
1183
- conforms to the :class: `SubprocessTransport ` base class.
1195
+ conforms to the :class: `SubprocessTransport ` base class and
1196
+ *protocol * is an object instantiated by the *protocol_factory *.
1184
1197
1185
1198
.. note ::
1186
1199
It is the application's responsibility to ensure that all whitespace
0 commit comments