offset property

int offset
final

Position of data within this stream's own byte sequence.

This is what the receiver reassembles on. Delivery order used to come from the packet's sequence number, which is allocated per connection, so a gap anywhere stalled every stream sharing that connection rather than only the one actually missing bytes. Addressing the bytes directly decouples them.

On a FIN the offset is the stream's final size, so a FIN that overtakes data still in flight does not truncate the tail.

Implementation

final int offset;