> What they mostly should know: TCP provides a bidirectional stream of bytes on the application level. It does NOT provide a stream of packets.
> That means whatever you pass to a send() call is not necessarily the same amount of data the receiver will observe in a single read() call.
Yes, this. For god's sake, listen to them.
I had to fight a coworker on this. I had quickly created some client code just to validate that the server was working. Due to some quirk, all the messages were arriving in full in every read call. He told me to ship it.
I said no! "I need to check if there's more data and if so add a loop to read again" "But it is working, release it". That went on for a while, to no avail. Wouldn't look at documentation either.
Eventually he head to leave for the day, and I took the time to implement it correctly.
I started including basic TCP questions on interviews. Not many people even get past the TCP handshake (if they even know about that).