c - TCP representation for unacknowledged data in sender's buffer -


what best way keep unacknowledged data buffer (sender's buffer) in tcp?

i thinking between keeping data itself, , keeping packets(header + data)?

it seems retransmission of packets hard if keep data bytes opposed keeping packets.

language: c

packet boundaries meaningless in tcp: it's possible half of packet's data acknowledged (say due fragmentation) , have retransmit remaining half.

so answer is: should keep raw data, not packets. real question should asking is: how know data has been acknowledged. need bit-mask each byte of data in window, , mark acknowledged data 1 , rest 0. whenever find contiguous block of data beginning of window has been acknowledged, portion can slid out.


Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -