6 ms·
The buffer you're thinking of is a packet-level queue to allow mismatches between physical transmission rates and processing rates, and is separate from the pro
by codebje 7y ago
The buffer you're thinking of is a packet-level queue to allow mismatches between physical transmission rates and processing rates, and is separate from the protocol.
The buffer the original comment is talking about is likely the TCP receive buffer, which is used both to allow the application layer to process bytes at its leisure rather than as they arrive, and to allow out-of-order data to be reassembled correctly rather than retransmitted in-order every time.
The receive buffer is documented at the protocol level. Well, honestly I don't recall if the buffer is ever documented in the spec or just common implementation practice. There is a documented "receive window" though, which is how many bytes the receiver is comfortable having "in flight" - sent but not acknowledged. The existence of this window implies the existence of a buffer at least as large as that window on the receiver.