This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: write() method in Transport should not buffer data
Type: Stage: resolved
Components: asyncio Versions: Python 3.6, Python 3.4, Python 3.5
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: Boss Kwei, asvetlov, yselivanov
Priority: normal Keywords:

Created on 2018-02-04 14:30 by Boss Kwei, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Messages (2)
msg311600 - (view) Author: Boss Kwei (Boss Kwei) Date: 2018-02-04 14:30
write() method implemented in https://github.com/python/cpython/blob/master/Lib/asyncio/selector_events.py#L830 is not stable in somecases. If this method was called too quickly, separate data will be packed and sent in same tcp package, which may be considered as unexpected behavior.
msg311601 - (view) Author: Andrew Svetlov (asvetlov) * (Python committer) Date: 2018-02-04 14:59
Transport buffers writes if kernel buffer is full, the behavior is intentional and present starting from very beginning of asyncio development.

Moreover, two plain socket.send() calls can be joined into single TCP packet, TCP protocol is a STREAM of data by design, not a sequence of packets.
History
Date User Action Args
2022-04-11 14:58:57adminsetgithub: 76944
2018-02-04 14:59:31asvetlovsetstatus: open -> closed
resolution: not a bug
messages: + msg311601

stage: resolved
2018-02-04 14:30:37Boss Kweicreate