3 ms·
I guess it’s talking about how the TCP data stream is segmented into IP packets. From the IP point of view, there are packets; from the application point of vie
by fanf2 2y ago
I guess it’s talking about how the TCP data stream is segmented into IP packets. From the IP point of view, there are packets; from the application point of view there is a data stream; but it’s more complicated than that. Applications have some control over when TCP’s PSH flag is set, roughly speaking, at the end of each write(); and that in turn affects segmentation because small pushed writes cause small packets. But if the sender can’t send straight away then buffered data doesn’t preserve write() boundaries and will be sent with large packets.
- paulddraper 2y agoI think we're talking about different things. TCP is a protocol that most certainly has packets ("segments"). You are taking about a SOCK_STREAM-like programming interface, which can be used to create TCP connections.