Hacker News new | past | comments | ask | show | jobs | submit login

We aren’t talking about raw networking; generally a QUIC implementation uses the kernel UDP stack, which buffers packets until read.



No but TCP sends keep-alive packets or something in the kernel right? If you can't send anything by the timeout then the connections should drop?


Only if you set the keepalive option, such as:

  int yes = 1;
  setsockopt(s, SOL_SOCKET, SO_KEEPALIVE, &yes, sizeof(yes));
Most servers (Xserver, imapd, sshd) set it.


Vanilla TCP does not do this. Sockets remain established forever in the absence of traffic.


This is a core feature in TCP/IP. Only the endpoints actually involved in the connection care about what a "connection" really is. If they share a connection, it should be nobody else's business that they do.


This is definitely not true in this world which is filled with NATs everywhere. The intermediate routers very much care and must care about what connections exist.


> UDP stack, which buffers packets until read

Not really. Or just up to a point only. Then it will drop them into the bit bucket without telling either the sender or receiver. With TCP the sender will "find out" eventually the receiver isn't getting the data.

The point is that with streams on top of UDP all that has to happen in the application layer.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: