Browse Source
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.pull/14123/head
Jared Hancock
8 months ago
committed by
Damien George
1 changed files with 26 additions and 3 deletions
Loading…
Reference in new issue