mirror of
https://github.com/python/cpython.git
synced 2025-12-31 04:23:37 +00:00
gh-113812: Allow DatagramTransport.sendto to send empty data (#115199)
Also include the UDP packet header sizes (8 bytes per packet) in the buffer size reported to the flow control subsystem.
This commit is contained in:
parent
8db8d7118e
commit
73e8637002
8 changed files with 50 additions and 16 deletions
|
|
@ -362,6 +362,11 @@ Datagram Transports
|
|||
This method does not block; it buffers the data and arranges
|
||||
for it to be sent out asynchronously.
|
||||
|
||||
.. versionchanged:: 3.13
|
||||
This method can be called with an empty bytes object to send a
|
||||
zero-length datagram. The buffer size calculation used for flow
|
||||
control is also updated to account for the datagram header.
|
||||
|
||||
.. method:: DatagramTransport.abort()
|
||||
|
||||
Close the transport immediately, without waiting for pending
|
||||
|
|
|
|||
|
|
@ -218,6 +218,12 @@ asyncio
|
|||
the Unix socket when the server is closed.
|
||||
(Contributed by Pierre Ossman in :gh:`111246`.)
|
||||
|
||||
* :meth:`asyncio.DatagramTransport.sendto` will now send zero-length
|
||||
datagrams if called with an empty bytes object. The transport flow
|
||||
control also now accounts for the datagram header when calculating
|
||||
the buffer size.
|
||||
(Contributed by Jamie Phan in :gh:`115199`.)
|
||||
|
||||
copy
|
||||
----
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue