mirror of
https://github.com/logicog/RTLPlayground.git
synced 2026-08-30 14:52:51 +08:00
This removes the limitation that a file served from FLASH memory needs to be smaller than the TCP buffer size. Now we serve up to the TCP buffer size in the first go and then remember what parts still need to be sent. As soon as the previous package has been acked, the next chunk of data is copied from flash into the TCP transmit buffer and gets sent. We take care only to send the current TCP window size so no further fragmentation needs to happen, thus optimizing transmission of the remainder.