View Javadoc
1   /*
2    * Copyright 2024 The Netty Project
3    *
4    * The Netty Project licenses this file to you under the Apache License,
5    * version 2.0 (the "License"); you may not use this file except in compliance
6    * with the License. You may obtain a copy of the License at:
7    *
8    *   https://www.apache.org/licenses/LICENSE-2.0
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12   * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13   * License for the specific language governing permissions and limitations
14   * under the License.
15   */
16  package io.netty.handler.codec.quic;
17  
18  import java.net.InetSocketAddress;
19  
20  /**
21   * Statistics about a path of the {@code QUIC} connection.
22   * If unknown by the implementation it might return {@code -1} values
23   * for the various methods.
24   */
25  public interface QuicConnectionPathStats {
26      /**
27       * @return The local address used by this path.
28       */
29      InetSocketAddress localAddress();
30  
31      /**
32       * @return The peer address seen by this path.
33       */
34      InetSocketAddress peerAddress();
35  
36      /**
37       * @return The validation state of the path.
38       */
39      long validationState();
40  
41      /**
42       * @return Whether this path is active.
43       */
44      boolean active();
45  
46      /**
47       * @return The number of QUIC packets received on this path.
48       */
49      long recv();
50  
51      /**
52       * @return The number of QUIC packets sent on this path.
53       */
54      long sent();
55  
56      /**
57       * @return The number of QUIC packets that were lost on this path.
58       */
59      long lost();
60  
61      /**
62       * @return The number of sent QUIC packets with retransmitted data on this path.
63       */
64      long retrans();
65  
66      /**
67       * @return The estimated round-trip time of the path (in nanoseconds).
68       */
69      long rtt();
70  
71      /**
72       * @return The size of the path's congestion window in bytes.
73       */
74      long cwnd();
75  
76      /**
77       * @return The number of sent bytes on this path.
78       */
79      long sentBytes();
80  
81      /**
82       * @return The number of received bytes on this path.
83       */
84      long recvBytes();
85  
86      /**
87       * @return The number of bytes lost on this path.
88       */
89      long lostBytes();
90  
91      /**
92       * @return The number of stream bytes retransmitted on this path.
93       */
94      long streamRetransBytes();
95  
96      /**
97       * @return The current PMTU for the path.
98       */
99      long pmtu();
100 
101     /**
102      * @return The most recent data delivery rate estimate in bytes/s.
103      */
104     long deliveryRate();
105 }