Forum Discussion
Altera_Forum
Honored Contributor
14 years agoMaybe you could accumulate the data sent by the user in an aligned buffer until the tcp stack actually sends the data?
For TCP it might be ok (if slightly unexpected) to resend the previous 1-3 bytes in order to always do aligned sends. If you are willing to do that, then the application send() could write directly into a pre-allocated buffer used for retransmissions and indexed by the tcp byte sequence number. Might be worth doing that anyway - but with a single buffer for 'realignment' transmits.