Skip to main content

check_end_of_track

Function check_end_of_track 

Source
fn check_end_of_track(
    object_id: VarInt,
    status: ObjectStatus,
) -> Result<(), CodecError>
Expand description

Refuse an end-of-track object that does not end at object zero.

Section 9.1.1.1 describes Object Status 0x5 as “end of Track. GroupID is one greater than the largest group produced in this track and the ObjectId is zero”, and states the consequence: “An object with this status that has a Group ID less than or equal to any other Group ID, or an Object ID other than zero, is a protocol error, and the receiver MUST terminate the session.”

Only the Object ID half is answerable here. The Group ID half compares against the largest group produced on the track, which no single header carries and no reader of one header can know.

Applied on both sides. A receiver is required to close the session over this, so writing one is not a way to send it.