inetstack
inetstack copied to clipboard
[tcp] Send Side Buffer Handling Issues
There are currently two implementations of the basic sender algorithm, one for immediate sending, and one for background sending. They should do roughly the same thing, although they currently don't, and there should be just a single implementation that is called from both places.
Also, in the immediate send case, nothing checks that the length of the buffer for immediate send actually fits within the MSS. A common send routine that runs all sends through the unsent queue could fix this effortlessly.
Finally, while splitting of large send requests into multiple segments is supported in the background sending case, coalescing of multiple small buffers into larger segments in not. This capability should be added. If there is a FIN, it should also be combined with the last data buffer into a single segment (might affect the representation of a FIN on the unacked queue, see Issue #125).