Record Class VersionInformation

java.lang.Object
java.lang.Record
io.github.mahmoudimus.quic.params.VersionInformation
Record Components:
chosenVersion - the version the sender chose for the connection, not zero
availableVersions - the sender's other versions: a client lists what its first flight is compatible with, the chosen version included; a server lists its fully deployed versions

public record VersionInformation(int chosenVersion, List<Integer> availableVersions) extends Record
The version_information transport parameter (RFC 9368 section 3), which authenticates version negotiation.
  • Field Details

    • VERSION_NEGOTIATION_ERROR

      public static final long VERSION_NEGOTIATION_ERROR
      The VERSION_NEGOTIATION_ERROR transport error code (RFC 9368 section 10.2).
      See Also:
  • Constructor Details

    • VersionInformation

      public VersionInformation(int chosenVersion, List<Integer> availableVersions)
      Version information.
      Parameters:
      chosenVersion - the chosen version
      availableVersions - the available versions
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • chosenVersion

      public int chosenVersion()
      Returns the value of the chosenVersion record component.
      Returns:
      the value of the chosenVersion record component
    • availableVersions

      public List<Integer> availableVersions()
      Returns the value of the availableVersions record component.
      Returns:
      the value of the availableVersions record component