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 zeroavailableVersions- 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
The
version_information transport parameter (RFC 9368 section 3), which authenticates
version negotiation.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final longTheVERSION_NEGOTIATION_ERRORtransport error code (RFC 9368 section 10.2). -
Constructor Summary
ConstructorsConstructorDescriptionVersionInformation(int chosenVersion, List<Integer> availableVersions) Version information. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theavailableVersionsrecord component.intReturns the value of thechosenVersionrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
VERSION_NEGOTIATION_ERROR
public static final long VERSION_NEGOTIATION_ERRORTheVERSION_NEGOTIATION_ERRORtransport error code (RFC 9368 section 10.2).- See Also:
-
-
Constructor Details
-
VersionInformation
Version information.- Parameters:
chosenVersion- the chosen versionavailableVersions- the available versions
-
-
Method Details
-
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. -
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. -
equals
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 withObjects::equals(Object,Object); primitive components are compared with '=='. -
chosenVersion
public int chosenVersion()Returns the value of thechosenVersionrecord component.- Returns:
- the value of the
chosenVersionrecord component
-
availableVersions
Returns the value of theavailableVersionsrecord component.- Returns:
- the value of the
availableVersionsrecord component
-