Skip to main content

belongs_on_a_request_stream

Function belongs_on_a_request_stream 

Source
fn belongs_on_a_request_stream(ty: MessageType) -> bool
Expand description

Whether draft-17 places this message on a request stream that is already open.

Four of them. REQUEST_UPDATE modifies the request its stream carries (Section 9.10). NAMESPACE and NAMESPACE_DONE report and withdraw the namespaces a SUBSCRIBE_NAMESPACE asked for, on that request’s own response stream (Sections 9.18 to 9.20), and PUBLISH_BLOCKED names a track in that namespace the publisher cannot offer (Section 9.21) — draft-17 has no SUBSCRIBE_TRACKS, so all three share one stream.

Endpoint::receive_message already closes the session over all four when they arrive on the control stream. Without this the client would write on the control stream exactly what its own peer half refuses to read there.