News for hackers. Stuff that matters.
Re:What developers should know about TCP by jes5199 on Friday May 15, 2020 @01:15PM (#23194655)
if you turn off Nagle's algorithm, it gets closer to this though
Re:What developers should know about TCP by jfkebwjsbx on Friday May 15, 2020 @02:12PM (#23195390)
No, it has nothing to do with that.
Re:What developers should know about TCP by Animats on Saturday May 16, 2020 @12:39AM (#23200532)
I suppose I should say something.

The thing to turn off is delayed ACKs. See "TCP_QUICKACK". Delayed ACKs were a feature which is only useful for things like Telnet, where the payload in each packet is one character when the user is typing. The fixed timer for delayed ACKs is for keyboard typing speeds, and for networks so slow that human typing could congest them. There's a reasonably good explanation here.[1]

As others said above, TCP is not a message protocol. It's a stream protocol. If you're sending messages over a stream, you need something that's reading data from the stream, and when it has a full message, it send that off to be processed. There is no set of TCP options which will reliably cause one write at the sending end to result in one read at the receiving end. If there were, it would be inefficient for small messages and would fail for large ones.

[1] https://www.extrahop.com/company/blog/2016/tcp-nodelay-nagle...