@@ -34,29 +34,26 @@ Stream functions
34
34
35
35
.. function :: start_server(client_connected_cb, host=None, port=None, \*, loop=None, limit=None, **kwds)
36
36
37
- Start a socket server, with a callback for each client connected.
37
+ Start a socket server, with a callback for each client connected. The return
38
+ value is the same as :meth: `~BaseEventLoop.create_server() `.
38
39
39
- The first parameter, *client_connected_cb *, takes two parameters:
40
+ The *client_connected_cb * parameter is called with two parameters:
40
41
*client_reader *, *client_writer *. *client_reader * is a
41
42
:class: `StreamReader ` object, while *client_writer * is a
42
- :class: `StreamWriter ` object. This parameter can either be a plain callback
43
- function or a :ref: `coroutine function < coroutine >`; if it is a coroutine
44
- function, it will be automatically wrapped in a future using the
45
- :meth: `BaseEventLoop.create_task ` method.
43
+ :class: `StreamWriter ` object. The * client_connected_cb * parameter can
44
+ either be a plain callback function or a :ref: `coroutine function
45
+ <coroutine>`; if it is a coroutine function, it will be automatically
46
+ wrapped in a future using the :meth: `BaseEventLoop.create_task ` method.
46
47
47
48
The rest of the arguments are all the usual arguments to
48
49
:meth: `~BaseEventLoop.create_server() ` except *protocol_factory *; most
49
- common are positional host and port, with various optional keyword arguments
50
- following. The return value is the same as
51
- :meth: `~BaseEventLoop.create_server() `.
50
+ common are positional *host * and *port *, with various optional keyword
51
+ arguments following.
52
52
53
53
Additional optional keyword arguments are *loop * (to set the event loop
54
54
instance to use) and *limit * (to set the buffer limit passed to the
55
55
:class: `StreamReader `).
56
56
57
- The return value is the same as :meth: `~BaseEventLoop.create_server() `, i.e.
58
- a :class: `AbstractServer ` object which can be used to stop the service.
59
-
60
57
This function is a :ref: `coroutine <coroutine >`.
61
58
62
59
.. function :: open_unix_connection(path=None, \*, loop=None, limit=None, **kwds)
0 commit comments