An Initial packet uses long headers with a type value of 0x00. It carries the first CRYPTO frames sent by the client and server to perform key exchange, and it carries ACK frames in either direction. Initial Packet { Header Form (1) = 1, Fixed Bit (1) = 1, Long Packet Type (2) = 0, Reserved Bits (2), # Protected Packet Number Length (2), # Protected Version (32), DCID Len (8), Destination Connection ID (0..160), SCID Len (8), Source Connection ID (0..160), Token Length (i), Token (..), Length (i), 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. Note that Quic Version 2 uses the same Initial Packet structure than Quic Version 1, but uses a different long packet type than that shown above. See RFC 9369, Section 3.2.
| Modifier and Type | Method and Description |
|---|---|
| public List | frames()
Redeclares as abstract: jdk. Returns this packet's frames. |
| public default boolean | hasLength()
Overrides default jdk. Whether this packet has a length field whose value can be read from the packet bytes. |
| public default QuicPacket. | numberSpace()
Implements jdk. Returns this packet's number space. |
| public long | Returns: this packet number.Redeclares as abstract: jdk. This packet number. |
| public default QuicPacket. | packetType()
Implements jdk. Returns this packet's type. |
| public default String | |
| public byte[] | Returns: the token bytes, if present,null if notReturns the token bytes, if present, |
| public int | Returns: the length of the token field, if present, 0 if notReturns the length of the token field, if present, 0 if not. |
| frames | back to summary |
|---|---|
| public List Redeclares as abstract: jdk. Doc from jdk. Returns this packet's frames.
| |
| hasLength | back to summary |
|---|---|
| public default boolean hasLength() Overrides default jdk. Doc from jdk. Whether this packet has a length field whose value can be read from the packet bytes.
| |
| numberSpace | back to summary |
|---|---|
| public default QuicPacket. Implements jdk. Doc from jdk. Returns this packet's number space.
| |
| packetNumber | back to summary |
|---|---|
| public long packetNumber() Redeclares as abstract: jdk. This packet number.
| |
| packetType | back to summary |
|---|---|
| public default QuicPacket. Implements jdk. Doc from jdk. Returns this packet's type.
| |
| prettyPrint | back to summary |
|---|---|
| public default String prettyPrint() Overrides default jdk.
| |
| token | back to summary |
|---|---|
| public byte[] token() Returns the token bytes, if present,
| |
| tokenLength | back to summary |
|---|---|
| public int tokenLength() Returns the length of the token field, if present, 0 if not.
| |