mirror of
https://github.com/python/cpython.git
synced 2025-09-27 02:39:58 +00:00
Merge 3.4 (asyncio doc)
This commit is contained in:
commit
3e48d77bcb
2 changed files with 13 additions and 0 deletions
|
@ -374,6 +374,14 @@ The following callbacks are called on :class:`Protocol` instances:
|
||||||
a connection. However, :meth:`eof_received` is called at most once
|
a connection. However, :meth:`eof_received` is called at most once
|
||||||
and, if called, :meth:`data_received` won't be called after it.
|
and, if called, :meth:`data_received` won't be called after it.
|
||||||
|
|
||||||
|
State machine:
|
||||||
|
|
||||||
|
start -> :meth:`~BaseProtocol.connection_made`
|
||||||
|
[-> :meth:`~Protocol.data_received` \*]
|
||||||
|
[-> :meth:`~Protocol.eof_received` ?]
|
||||||
|
-> :meth:`~BaseProtocol.connection_lost` -> end
|
||||||
|
|
||||||
|
|
||||||
Datagram protocols
|
Datagram protocols
|
||||||
------------------
|
------------------
|
||||||
|
|
||||||
|
|
|
@ -78,6 +78,11 @@ class Protocol(BaseProtocol):
|
||||||
State machine of calls:
|
State machine of calls:
|
||||||
|
|
||||||
start -> CM [-> DR*] [-> ER?] -> CL -> end
|
start -> CM [-> DR*] [-> ER?] -> CL -> end
|
||||||
|
|
||||||
|
* CM: connection_made()
|
||||||
|
* DR: data_received()
|
||||||
|
* ER: eof_received()
|
||||||
|
* CL: connection_lost()
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def data_received(self, data):
|
def data_received(self, data):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue