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

public Interface HandshakePacket

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

This class models Quic Handshake Packets, as defined by RFC 9000, Section 17.2.4:
A Handshake packet uses long headers with a type value of 0x02, 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.
   It is used to carry cryptographic handshake messages and acknowledgments
   from the server and client.

   Handshake Packet {
     Header Form (1) = 1,
     Fixed Bit (1) = 1,
     Long Packet Type (2) = 2,
     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 Handshake 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

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