getParameter(TransportParameterId)
yields null. The parameter is present otherwise.
Parameters can be removed by calling setParameter(id, null).
The methods getBooleanParameter(TransportParameterId) and
getIntParameter(TransportParameterId) allow easy access to
parameters whose type is boolean or int, respectively.
When such a parameter is absent, its default value is returned by
those methods.
From
RFC 9000, section 18.2:
Many transport parameters listed here have integer values. Those transport parameters that are identified as integers use a variable-length integer encoding; see Section 16. Transport parameters have a default value of 0 if the transport parameter is absent, unless otherwise stated.[...]
If present, transport parameters that set initial per-stream flow control limits (initial_max_stream_data_bidi_local, initial_max_stream_data_bidi_remote, and initial_max_stream_data_uni) are equivalent to sending a MAX_STREAM_DATA frame (Section 19.10) on every stream of the corresponding type immediately after opening. If the transport parameter is absent, streams of that type start with a flow control limit of 0. A client MUST NOT include any server-only transport parameter: original_destination_connection_id, preferred_address, retry_source_connection_id, or stateless_reset_token. A server MUST treat receipt of any of these transport parameters as a connection error of type TRANSPORT_PARAMETER_ERROR.
ParameterId
| Modifier and Type | Class and Description |
|---|---|
| public static enum | QuicTransportParameters.
Standard Quic transport parameter names and ids. |
| public static interface | QuicTransportParameters.
An interface to model a transport parameter ID. A transport parameter ID has a name (which is not transmitted) and an identifier. |
| public static record |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv static final int | |
| pack-priv static final int | |
| pack-priv static final int | |
| pack-priv static final int | |
| pack-priv static final int | |
| pack-priv static final int | |
| pack-priv static final int | |
| pack-priv static final int | |
| pack-priv static final int | |
| pack-priv static final int | |
| pack-priv static final int | |
| pack-priv static final byte[] | |
| pack-priv static final int | |
| pack-priv static final int | |
| private final Map | values
A map to store transport parameter values. |
| Access | Constructor and Description |
|---|---|
| public | |
| public | QuicTransportParameters(QuicTransportParameters
the parameter collection used to initialize this object * params)Constructs a new collection of Quic transport parameters initialized from the specified collection. |
| Modifier and Type | Method and Description |
|---|---|
| public static QuicTransportParameters. | Returns: aVersionInformation object corresponding to the specified versionschosen version chosenVersion, List<QuicVersion> available versions availableVersions)Returns a |
| private static QuicTransportParameters. | Returns: the corresponding parameter id if the value is acceptable, else throws aIllegalArgumentExceptionthe transport parameter id tpid,the value value)verifies that the |
| public static QuicTransportParameters | Returns: the decoded transport parametersa byte buffer containing the transport parameters buffer)Decodes the quic transport parameters from the given buffer. |
| private static long | |
| public int | Returns: the number of bytes writtena byte buffer in which to encode the transport parameters buffer)Encodes the transport parameters into the given byte buffer. |
| public boolean | Returns: the value of the given parameter, as a booleanthe parameter id idReturns the value of the given parameter, as a boolean. |
| private static InetAddress | |
| public long | Returns: the value of the given parameter, as an unsigned int in the range[0, 2^62 - 1]the parameter id idReturns the value of the given parameter, as an unsigned int
in the range |
| private long | |
| public long | Returns: the value of the given parameter, as an unsigned int in the range[0, 2^62 - 1]the parameter id id,Returns the value of the given parameter, as an unsigned int
in the range |
| public byte[] | getParameter(QuicTransportParameters.
the parameter id id{@return the value of the given parameter, as a byte array, or
|
| public static List | getPreferredAddress(QuicTransportParameters.
the parameter id id,the value of the parameter value)Reads the preferred address encoded in the value
of a parameter whose format corresponds to the |
| public static ByteBuffer | Returns: the connection id bytesthe value of preferredAddressValue)ParameterId#preferred_address paramReads the connection id bytes from the value of a parameter
whose format corresponds to the |
| private static int | |
| public static byte[] | Returns: the stateless reset token bytesthe value of preferredAddressValue)ParameterId#preferred_address paramReads the stateless token bytes from the value of a parameter
whose format corresponds to the |
| public QuicTransportParameters. | Returns: the value of the given parameter, asVersionInformationthe parameter id idReturns the value of the given parameter, as |
| public boolean | Returns: true if the given parameter is present, false otherwisethe parameter id idReturns true if the given parameter is present, false otherwise. |
| public boolean | Returns: true if the value of the given parameter matches the given connection IDthe transport parameter id id,the connection id to match against connectionId)Returns true if the value of the given parameter matches the given connection ID. |
| public void | setBooleanParameter(QuicTransportParameters.
the parameter id id,the new value of the parameter value)Sets the value of the given parameter, as a boolean. |
| public void | setIntParameter(QuicTransportParameters.
the parameter id id,the new value of the parameter, or a negative value value)Sets the value of the given parameter, as an unsigned int. |
| private void | |
| public void | setParameter(QuicTransportParameters.
the parameter id id,the new parameter value, or value)null.Sets the value of the given parameter. |
| public void | setPreferredAddressParameter(QuicTransportParameters.
the parameter id id,the preferred IPv4 address (or the IPv4 wildcard address) ipv4, int the preferred IPv4 port (or 0) port4, Inet6Address the preferred IPv6 address (or the IPv6 wildcard address) ipv6, int the preferred IPv6 port (or 0) port6, ByteBuffer the connection id bytes connectionId, ByteBuffer the stateless token statelessToken)Sets the value of a parameter whose format corresponds to the
|
| public void | setVersionInformationParameter(QuicTransportParameters.
the parameter id id,the new value of the parameter valueSets the value of the given parameter, as |
| public int | Returns: the size in bytes required to encode the parameter arrayReturns the size in bytes required to encode the parameter array. |
| public String | |
| public String | |
| private String |