public final class QuicHeaderParser
extends java.lang.Object
implements java.lang.AutoCloseable
close() to ensure all resources are
released. Failed to do so may lead to memory leaks.
This class can be used for advanced use-cases. Usually you want to just use QuicClientCodecBuilder or
QuicServerCodecBuilder.| Modifier and Type | Class and Description |
|---|---|
static interface |
QuicHeaderParser.QuicHeaderProcessor
Called when a QUIC packet and its header could be parsed.
|
| Constructor and Description |
|---|
QuicHeaderParser(int maxTokenLength,
int localConnectionIdLength) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
parse(java.net.InetSocketAddress sender,
java.net.InetSocketAddress recipient,
io.netty.buffer.ByteBuf packet,
QuicHeaderParser.QuicHeaderProcessor callback)
Parses a QUIC packet and extract the header values out of it.
|
public QuicHeaderParser(int maxTokenLength,
int localConnectionIdLength)
public void close()
close in interface java.lang.AutoCloseablepublic void parse(java.net.InetSocketAddress sender,
java.net.InetSocketAddress recipient,
io.netty.buffer.ByteBuf packet,
QuicHeaderParser.QuicHeaderProcessor callback)
throws java.lang.Exception
ReferenceCounted.release() once the packet is not needed
anymore.sender - the sender of the packet. This is directly passed to the QuicHeaderParser.QuicHeaderProcessor once
parsing was successful.recipient - the recipient of the packet.This is directly passed to the QuicHeaderParser.QuicHeaderProcessor once
parsing was successful.packet - raw QUIC packet itself. The ownership of the packet is not transferred. This is directly
passed to the QuicHeaderParser.QuicHeaderProcessor once parsing was successful.callback - the QuicHeaderParser.QuicHeaderProcessor that is called once a QUIC packet could be parsed and all
the header values be extracted.java.lang.Exception - thrown if we couldn't parse the header or if the QuicHeaderParser.QuicHeaderProcessor throws an
exception.Copyright © 2020-2021 The Netty Project. All Rights Reserved.