APIdia Launch Partner
Top Description Methods
jdk.internal.net.http.quic.packets

public Interface ZeroRttPacket

extends LongHeaderPacket
Known Direct Implementers
jdk.internal.net.http.quic.packets.QuicPacketDecoder.IncomingZeroRttPacket, jdk.internal.net.http.quic.packets.QuicPacketEncoder.OutgoingZeroRttPacket
Imports
java.util.List, jdk.internal.net.http.quic.frames.QuicFrame

This class models Quic 0-RTT Packets, as defined by RFC 9000, Section 17.2.3:
A 0-RTT packet uses long headers with a type value of 0x01, followed
   by the Length and Packet Number fields; see Section 17.2. The first
   byte contains the Reserved and Packet Number Length bits; see Section 17.2.
   A 0-RTT packet is used to carry "early" data from the client to the server
   as part of the first flight, prior to handshake completion. As part of the
   TLS handshake, the server can accept or reject this early data.

   See Section 2.3 of [TLS13] for a discussion of 0-RTT data and its limitations.

   0-RTT Packet {
     Header Form (1) = 1,
     Fixed Bit (1) = 1,
     Long Packet Type (2) = 1,
     Reserved Bits (2),
     Packet Number Length (2),
     Version (32),
     Destination Connection ID Length (8),
     Destination Connection ID (0..160),
     Source Connection ID Length (8),
     Source Connection ID (0..160),
     Length (i),
     Packet Number (8..32),
     Packet Payload (..),
   }
 

Subclasses of this class may be used to model packets exchanged with either Quic Version 1 or Quic Version 2. Note that Quic Version 2 uses the same 0-RTT Packet structure than Quic Version 1, but uses a different long packet type than that shown above. See RFC 9369, Section 3.2.

External Specification
https://www.rfc-editor.org/info/rfc9000, https://www.rfc-editor.org/info/rfc9369
See Also
RFC 9000, Section 17.2, [TLS13] RFC 8446, Section 2.3

Method Summary

Modifier and TypeMethod and Description
public List<QuicFrame>
frames()

Redeclares as abstract: jdk.internal.net.http.quic.packets.QuicPacket.frames.

Returns this packet's frames.

public default boolean
hasLength()

Overrides default jdk.internal.net.http.quic.packets.QuicPacket.hasLength.

Whether this packet has a length field whose value can be read from the packet bytes.

public default QuicPacket.PacketNumberSpace
numberSpace()

Implements jdk.internal.net.http.quic.packets.QuicPacket.numberSpace.

Returns this packet's number space.

public long

Returns:

this packet number.
packetNumber
()

Redeclares as abstract: jdk.internal.net.http.quic.packets.QuicPacket.packetNumber.

This packet number.

public default QuicPacket.PacketType
Inherited from jdk.internal.net.http.quic.packets.LongHeaderPacket:
headersTypesourceIdversion

Method Detail

framesback to summary
public List<QuicFrame> frames()

Redeclares as abstract: jdk.internal.net.http.quic.packets.QuicPacket.frames.

Doc from jdk.internal.net.http.quic.packets.QuicPacket.frames.

Returns this packet's frames.

Annotations
@Override
hasLengthback to summary
public default boolean hasLength()

Overrides default jdk.internal.net.http.quic.packets.QuicPacket.hasLength.

Doc from jdk.internal.net.http.quic.packets.QuicPacket.hasLength.

Whether this packet has a length field whose value can be read from the packet bytes.

Annotations
@Override
numberSpaceback to summary
public default QuicPacket.PacketNumberSpace numberSpace()

Implements jdk.internal.net.http.quic.packets.QuicPacket.numberSpace.

Doc from jdk.internal.net.http.quic.packets.QuicPacket.numberSpace.

Returns this packet's number space.

Annotations
@Override
packetNumberback to summary
public long packetNumber()

Redeclares as abstract: jdk.internal.net.http.quic.packets.QuicPacket.packetNumber.

This packet number.

Returns:long

this packet number.

Annotations
@Override
packetTypeback to summary
public default QuicPacket.PacketType packetType()

Implements jdk.internal.net.http.quic.packets.QuicPacket.packetType.

Doc from jdk.internal.net.http.quic.packets.QuicPacket.packetType.

Returns this packet's type.

Annotations
@Override