News for hackers. Stuff that matters.
Re:Never* Use Datagrams by lxgr on Sunday June 23, 2024 @10:55AM (#40767898)
TCP kind of supports that with selective acknowledgements these days, I think.
Re:Never* Use Datagrams by vitus on Sunday June 23, 2024 @11:03AM (#40767975)
SACKs have been in TCP for 25-30 years now (Widely adopted as part of New Reno, although RFC 2018 proposed the TCP option and implementation back in 1996).

That said, the typical reason why TCP doesn't send packet N+1 is because its congestion window is full.

There is a related problem known as head-of-line blocking where the application won't receive packet N+1 from the kernel until packet N has been received, as a consequence of TCP delivering that in-order stream of bytes.

Re:Never* Use Datagrams by eru on Monday June 24, 2024 @08:33PM (#40782884)
Sorry, I didn't literally mean n+1. What I mean is probably better described by 'head of line blocking'.

Basically, when transmitting a file, in principle you could just keep sending n+k, even if the n-th package hasn't been received or has been dropped. No matter how large k is.

You can take your sweet time fixing the missing packages in the middle, as long as the overall file transfer doesn't get delayed.