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-18 Table 5 places this message on a request stream that is already open.

All four of the messages Table 5 marks “Request” without their beginning one: REQUEST_UPDATE modifies the request its stream carries (Section 10.9), NAMESPACE and NAMESPACE_DONE report namespaces on the SUBSCRIBE_NAMESPACE stream that asked for them (Sections 10.16 and 10.17), and PUBLISH_BLOCKED names a track on the SUBSCRIBE_TRACKS stream that asked for it (Section 10.20).

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.