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

public Interface OneRttPacket

extends ShortHeaderPacket
Known Direct Implementers
jdk.internal.net.http.quic.packets.QuicPacketDecoder.IncomingOneRttPacket, jdk.internal.net.http.quic.packets.QuicPacketEncoder.OutgoingOneRttPacket
Imports
java.util.List, jdk.internal.net.http.quic.frames.QuicFrame

This class models Quic 1-RTT packets, as defined by RFC 9000, Section 17.3.1:
A 1-RTT packet uses a short packet header. It is used after the
   version and 1-RTT keys are negotiated.

   1-RTT Packet {
     Header Form (1) = 0,
     Fixed Bit (1) = 1,
     Spin Bit (1),
     Reserved Bits (2),         # Protected
     Key Phase (1),             # Protected
     Packet Number Length (2),  # Protected
     Destination Connection ID (0..160),
     Packet Number (8..32),     # Protected
     # Protected Packet Payload:
     Protected Payload (0..24), # Skipped Part
     Protected Payload (128),   # Sampled Part
     Protected Payload (..),    # Remainder
   }

Subclasses of this class may be used to model packets exchanged with either Quic Version 1 or Quic Version 2. Quic Version 2 uses the same 1-RTT packet structure than Quic Version 1.

External Specification
https://www.rfc-editor.org/info/rfc9000, https://www.rfc-editor.org/info/rfc9369

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 int

Returns:

the packet's Key Phase Bit
keyPhase
()

Returns the packet's Key Phase Bit: 0 or 1, if known.

public default QuicPacket.PacketNumberSpace
numberSpace()

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

Returns this packet's number space.

public default QuicPacket.PacketType
public default String
public default int

Returns:

the packet's Latency Spin Bit
spin
()

Returns the packet's Latency Spin Bit: 0 or 1, if known.

Inherited from jdk.internal.net.http.quic.packets.ShortHeaderPacket:
headersType

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
keyPhaseback to summary
public default int keyPhase()

Returns the packet's Key Phase Bit: 0 or 1, if known. Returns -1 for outgoing packets. RFC 9000, Section 17.3.1:

Bit (0x04) of byte 0 indicates the key phase, which allows a recipient
    of a packet to identify the packet protection keys that are used to
    protect the packet. See [QUIC-TLS] for details.
    This bit is protected using header protection; see Section 5.4 of [QUIC-TLS].
Returns:int

the packet's Key Phase Bit

See Also
RFC 9001, [QUIC-TLS], RFC 9001, Section 5.4, [QUIC-TLS]
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
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
prettyPrintback to summary
public default String prettyPrint()

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

Annotations
@Override
spinback to summary
public default int spin()

Returns the packet's Latency Spin Bit: 0 or 1, if known. Returns -1 for outgoing packets. RFC 9000, Section 17.3.1:

The third most significant bit (0x20) of byte 0 is the latency spin
    bit, set as described in Section 17.4.
Returns:int

the packet's Latency Spin Bit

See Also
RFC 9000, Section 17.4