Skip to main content

spoolframe_protocol/
streams.rs

1//! What each QUIC stream on a connection is for (ARCHITECTURE ยง33). The
2//! first byte on a stream says.
3
4/// The first byte of every bidirectional stream the client opens.
5pub mod bi {
6    /// One request frame, then a bounded multipart RPC response.
7    pub const RPC: u8 = 1;
8    /// A `ResourceRequest`, `ResourceResponse`, and bounded raw body.
9    pub const RESOURCE: u8 = 2;
10}
11
12/// The first byte of every unidirectional stream the server opens.
13pub mod uni {
14    /// Event frames for the life of the connection, opened after `Hello`.
15    pub const EVENTS: u8 = 1;
16}
17
18/// QUIC stream reset codes.
19pub mod reset {
20    /// The first byte named a stream kind this peer does not serve.
21    pub const UNKNOWN_STREAM_KIND: u32 = 1;
22    /// The stream's kind byte and first frame did not arrive in time
23    /// (PX-10).
24    pub const FIRST_FRAME_TIMEOUT: u32 = 2;
25    /// The server answers as many requests of a paired server's sessions
26    /// at once as it will (Y8-02): wait for one to end, and ask again.
27    pub const BUSY: u32 = 3;
28}