| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public static int | Returns: the number of bytes required to encode the packetthe full packet number fullPN, long the largest ACK'd packet, or -1 if none so far largestAcked)Returns the number of bytes needed to encode a packet number given the full packet number and the largest ACK'd packet. |
| public static long | Returns: the decoded packet numberthe largest packet number that has been successfully
processed in the current packet number space largestPN, ByteBuffer a buf, int ByteBuffer containing the value of the
Packet Number fieldthe number of bytes indicated by the Packet
Number Length field pnNBytes)Decode the packet numbers against the largest ACK'd packet after header protection has been removed. |
| public static byte[] | Returns: byte array containing fullPNthe full packet number fullPN, long the largest ACK'd packet, or -1 if none so far largestAcked)Encode the full packet number against the largest ACK'd packet. |
| public static byte[] | Returns: byte array containing fullPNthe full packet number fullPN, int the number of bytes in which to encode
the packet number numBytes)Truncate the full packet number to fill into |
| QuicPacketNumbers | back to summary |
|---|---|
| public QuicPacketNumbers() | |
| computePacketNumberLength | back to summary |
|---|---|
| public static int computePacketNumberLength(long fullPN, long largestAcked) Returns the number of bytes needed to encode a packet number given the full packet number and the largest ACK'd packet.
| |
| decodePacketNumber | back to summary |
|---|---|
| public static long decodePacketNumber(long largestPN, ByteBuffer buf, int pnNBytes) Decode the packet numbers against the largest ACK'd packet after header protection has been removed. Follows the algorithm outlined in RFC 9000, Appendix A.3
| |
| encodePacketNumber | back to summary |
|---|---|
| public static byte[] encodePacketNumber(long fullPN, long largestAcked) Encode the full packet number against the largest ACK'd packet. Follows the algorithm outlined in RFC 9000. Appendix A.2
| |
| truncatePacketNumber | back to summary |
|---|---|
| public static byte[] truncatePacketNumber(long fullPN, int numBytes) Truncate the full packet number to fill into API Note
| |