diff options
author | Jared Hancock <jared.hancock@centeredsolutions.com> | 2024-03-18 16:38:15 -0500 |
---|---|---|
committer | Damien George <damien@micropython.org> | 2024-05-23 22:25:06 +1000 |
commit | b1e960270213a88eb02219d85201198c4a8671c6 (patch) | |
tree | 5d175c3f8c353e756b76b1be359a4b43ce66d99c /py/dynruntime.h | |
parent | d532f960a4c40e4e6661ddc1d9eced18c37e3377 (diff) | |
download | micropython-b1e960270213a88eb02219d85201198c4a8671c6.tar.gz micropython-b1e960270213a88eb02219d85201198c4a8671c6.zip |
extmod/modlwip: Use Nagle algorithm and add support for TCP_NODELAY.
This adds support to use the Nagle algorithm implemented already in lwIP to
determine when TCP data should be sent.
As currently written, MicroPython will only create packets if there is <25%
remaining in the send buffer. Using it, sending a small message of ~50
bytes will not trigger output of the message on the network. So it will
remained queued until the TCP interval timer expires, which can be up to
500ms.
Using Nagle's algorithm, the first write, no matter how small, will
generate a packet on the network. And sending lots of data still makes
efficient use of the link.
In addition to this, an application designer may choose to always create
packets for every write by setting the TCP_NODELAY socket option. That's
also implemented in this commit.
Diffstat (limited to 'py/dynruntime.h')
0 files changed, 0 insertions, 0 deletions