QuicPacketReceiver is an abstraction that defines the
interface between a QuicEndpoint and a QuicConnection.
This defines the minimum set of methods that the endpoint will need
in order to be able to dispatch a received jdk.internal.net.http.quic.packets.QuicPacket
to its destination. This abstraction is typically useful when dealing with
{@linkplain QuicEndpoint.ClosedConnection
closed connections, which need to remain alive for a certain time
after being closed in order to satisfy the requirement of the quic
protocol (typically for retransmitting the CLOSE_CONNECTION frame
if needed).
| Modifier and Type | Method and Description |
|---|---|
| public default boolean | Returns: whether this receiver accepts packets from the given sourcethe sender address source)Returns whether this receiver accepts packets from the given source. |
| public List | |
| public List | |
| public default void | datagramDiscarded(QuicEndpoint.
the datagram that was discarded datagramCalled after a datagram has been discarded as a result of some error being raised, for instance, when an attempt to write it to the socket has failed, or if the encryption of a packet in the datagram has failed. |
| public default void | datagramDropped(QuicEndpoint.
the datagram that was dropped datagramCalled after a datagram has been dropped. |
| public default void | datagramSent(QuicEndpoint.
the datagram that was sent datagramCalled after a datagram has been written to the socket. |
| public default Optional | Returns: the initial connection id assigned by the peerReturns the initial connection id assigned by the peer. |
| public void | onWriteError(Throwable
the error that occurred t)Called when a datagram scheduled for writing by this connection could not be written to the network. |
| public void | processIncoming(SocketAddress
The peer address, as received from the UDP stack source, ByteBuffer Destination connection id bytes included in the packet destConnId, QuicPacket.The quic packet type headersType,A buffer positioned at the start of the quic packet,
not yet decrypted, and possibly containing coalesced
packets. buffer)Called when an incoming datagram is received. |
| public void | |
| public void |
| accepts | back to summary |
|---|---|
| public default boolean accepts(SocketAddress source) Returns whether this receiver accepts packets from the given source.
| |
| activeResetTokens | back to summary |
|---|---|
| public List {@return a list of active peer stateless reset tokens for this connection) | |
| connectionIds | back to summary |
|---|---|
| public List {@return a list of local connectionIds for this connection) | |
| datagramDiscarded | back to summary |
|---|---|
| public default void datagramDiscarded(QuicEndpoint. Called after a datagram has been discarded as a result of some error being raised, for instance, when an attempt to write it to the socket has failed, or if the encryption of a packet in the datagram has failed. At this point the datagram's ByteBuffer can typically be released, or returned to a buffer pool. Implementation Specification The default implementation of this method does nothing.
| |
| datagramDropped | back to summary |
|---|---|
| public default void datagramDropped(QuicEndpoint. Called after a datagram has been dropped. Typically, this could happen if the datagram was only partly written, or if the connection was closed before the datagram could be sent. At this point the datagram's ByteBuffer can typically be released, or returned to a buffer pool. Implementation Specification The default implementation of this method does nothing.
| |
| datagramSent | back to summary |
|---|---|
| public default void datagramSent(QuicEndpoint. Called after a datagram has been written to the socket. At this point the datagram's ByteBuffer can typically be released, or returned to a buffer pool. Implementation Specification The default implementation of this method does nothing.
| |
| initialConnectionId | back to summary |
|---|---|
| public default Optional Returns the initial connection id assigned by the peer.
On the client side, this is always Implementation Specification The default implementation of this method returns
| |
| onWriteError | back to summary |
|---|---|
| public void onWriteError(Throwable t) Called when a datagram scheduled for writing by this connection could not be written to the network.
| |
| processIncoming | back to summary |
|---|---|
| public void processIncoming(SocketAddress source, ByteBuffer destConnId, QuicPacket. Called when an incoming datagram is received. The buffer is positioned at the start of the datagram to process. The buffer may contain more than one QUIC packet.
| |
| processStatelessReset | back to summary |
|---|---|
| public void processStatelessReset() Called when a stateless reset token is received. | |
| shutdown | back to summary |
|---|---|
| public void shutdown() Called to shut a closed connection down. This is the last step when closing a connection, and typically only release resources held by all packet spaces. | |