Debian Codegraph @

third_party/rust/neqo-transport/src/recovery/token.rs

raw
1 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
2 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
3 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
4 // option. This file may not be copied, modified, or distributed
5 // except according to those terms.
6
7 use crate::{
8 ackrate::AckRate,
9 cid::ConnectionIdEntry,
10 crypto::CryptoRecoveryToken,
11 quic_datagrams::DatagramTracking,
12 send_stream::SendStreamRecoveryToken,
13 stream_id::{StreamId, StreamType},
14 tracking::AckToken,
15 };
16
17 #[derive(Debug, Clone)]
18 pub enum StreamRecoveryToken {
19 Stream(SendStreamRecoveryToken),
20 ResetStream {
21 stream_id: StreamId,
22 },
23 StopSending {
24 stream_id: StreamId,
25 },
26
27 MaxData(u64),
28 DataBlocked(u64),
29
30 MaxStreamData {
31 stream_id: StreamId,
32 max_data: u64,
33 },
34 StreamDataBlocked {
35 stream_id: StreamId,
36 limit: u64,
37 },
38
39 MaxStreams {
40 stream_type: StreamType,
41 max_streams: u64,
42 },
43 StreamsBlocked {
44 stream_type: StreamType,
45 limit: u64,
46 },
47 }
48
49 #[derive(Debug, Clone)]
50 pub enum RecoveryToken {
51 Stream(StreamRecoveryToken),
52 Ack(AckToken),
53 Crypto(CryptoRecoveryToken),
54 HandshakeDone,
55 KeepAlive, // Special PING.
56 NewToken(usize),
57 NewConnectionId(ConnectionIdEntry<[u8; 16]>),
58 RetireConnectionId(u64),
59 AckFrequency(AckRate),
60 Datagram(DatagramTracking),
61 /// A packet marked with [`neqo_common::IpTosEcn::Ect0`].
62 EcnEct0,
63 }