Re:What developers should know about TCP
by Matthias247 on Friday May 15, 2020 @01:16PM
(#23194666)
I didn't meant to talk about OSI terminologies. It was more about: [user-space] applications which use the TCP/IP stack do not observe packet boundaries, whereas the Kernel certainly does. Obviously this is a bit ambiguous, and you can even get packet boundaries in user-space by running a TCP stack there. But for most TCP/IP usages it holds true.
Re:What developers should know about TCP
by austincheney on Friday May 15, 2020 @01:51PM
(#23195096)
> It was more about: [user-space] applications which use the TCP/IP stack do not observe packet boundaries
That is still a bit imprecise. Userland applications won't directly see TCP as they are just looking at an application protocol. Typically it's the OS that packages and unpacks the application protocol data into a TCP segment, so of course the userland application won't see it since its not managing that part of the communication.
https://en.wikipedia.org/wiki/Transmission_Control_Protocol#...
There are some exceptions where some application platforms allow developers to write custom TCP protocols, such as Node.js, but these exceptions generally apply to network services and don't commonly apply to the end user application experiance.
https://nodejs.org/dist/latest-v14.x/docs/api/net.html#net_n...
The network layer on which the transport layer rides is packet switched. The TCP uses segments with each segment having its own header and sequence numbers. Streams are just a series of segments populating across a single established handshake without a prior defined termination segment.