Class PathData

java.lang.Object
io.github.mahmoudimus.quic.connection.PathData

public final class PathData extends Object
One network path of a connection (RFC 9000 section 9): the peer's address, the local address the connection uses on it, and what is measured per path: the RTT, the congestion controller, the pacer, MTU discovery, the delivery rate, the bytes in flight, and the anti-amplification counts until the path is validated (RFC 9000 section 8). Recovery keeps the current path; a connection that migrates swaps in a new one and keeps the previous one for the packets still in flight on it.

Packets carry the generation of the path they were sent on, so that acknowledging or losing them updates the right path's counts.

Threads. Not thread-safe; owned by one connection.

  • Method Details

    • remote

      public InetSocketAddress remote()
      The peer's address on this path.
      Returns:
      the address, or null if not set
    • local

      public InetSocketAddress local()
      The local address on this path.
      Returns:
      the address, or null for the endpoint's default
    • isValidated

      public boolean isValidated()
      Whether the path is validated.
      Returns:
      true once the peer proved it receives on it
    • isValidating

      public boolean isValidating()
      Whether this endpoint awaits a PATH_RESPONSE on the path.
      Returns:
      true while validating it
    • generation

      public long generation()
      The path's generation, which tells its packets from those of other paths.
      Returns:
      the generation
    • toString

      public String toString()
      Overrides:
      toString in class Object