This module contains the main abstractions for the QUIC protocol.
A org. is a org.
that receives and sends bytes from its underlying org..
A org. manages many org.s,
one for each QUIC connection ID.
A org. manages many QUIC streams, identified by a
stream ID and represented by org..
A org. delegates I/O processing to a protocol-specific
org., whose responsibility is to use QUIC streams
to implement the protocol-specific I/O processing.
The org. associated with each org.
parses the bytes received on the QUIC stream represented by the org.,
and generates the bytes to send on that QUIC stream.
On the client side, the layout of the components in case of HTTP/1.1 is the following:
DatagramChannelEndPoint -- ClientQuicConnection -- ClientQuicSession -- ClientProtocolSession -- QuicStreamEndPoint -- HttpConnectionOverHTTP
The client specific org. creates one bidirectional QUIC stream
that represent the same transport as a TCP stream, over which HTTP/1.1 bytes are exchanged by the two peers.
On the client side, the layout of the components in case of HTTP/3 is the following:
DatagramChannelEndPoint -- ClientQuicConnection -- ClientQuicSession -- ClientHTTP3Session -* QuicStreamEndPoint -- ClientHTTP3StreamConnection
In this case, the client specific, HTTP/3 specific, org. creates
and manages zero or more bidirectional QUIC streams, over which HTTP/3 bytes are exchanged by the two peers.
On the server side, the layout of the components in case of HTTP/1.1 is the following:
CLIENT | SERVER
clientA ServerQuicSessionA -- ServerProtocolSessionA -- QuicStreamEndPointA -- HttpConnection
\ /
DatagramChannelEndPoint -- ServerQuicConnection
/ \
clientB ServerQuicSessionB -- ServerProtocolSessionB -- QuicStreamEndPointB -- HttpConnection
The DatagramChannelEndPoint listens on the server port and receives UDP datagrams from all clients.
The server side QuicConnection processes the incoming datagram bytes creating a QuicSession for
every QUIC connection ID sent by the clients.
The clients have created a single QUIC stream to send HTTP/1.1 requests, which results in the
QuicSessions to create a correspondent QuicStreamEndPoint with its associated HttpConnection.
The path DatagramChannelEndPoint - ServerQuicConnection - ServerQuicSession - ServerProtocolSession - QuicStreamEndPoint
behaves exactly like a TCP org. for the associated
HttpConnection.
On the server side, the layout of the components in case of HTTP/3 is the following:
CLIENT | SERVER
clientA ServerQuicSessionA -# ServerProtocolSessionA -- QuicStreamEndPointA1 -- ServerHTTP3StreamConnection
\ / \ QuicStreamEndPointA2 -- ServerHTTP3StreamConnection
DatagramChannelEndPoint -- ServerQuicConnection
/ \ / QuicStreamEndPointB1 -- ServerHTTP3StreamConnection
clientB ServerQuicSessionB -# ServerProtocolSessionB -- QuicStreamEndPointB2 -- ServerHTTP3StreamConnection
In this case, the server specific, HTTP/3 specific, org. creates
and manages zero or more bidirectional QUIC streams, created by the clients, over which HTTP/3 bytes are exchanged
by the two peers.
In a more compact representation, the server side layout is the following:
DatagramChannelEndPoint -- ServerQuicConnection -* ServerQuicSession -# ServerProtocolSession -* QuicStreamEndPoint -- ServerHTTP3StreamConnectionwhere
-- represents a 1-1 relationship, -* represents a 1-N relationship, and -# represents the
place where a new thread is dispatched to process different QUIC connection IDs so that they can be processed in parallel,
as it would naturally happen with TCP (which has a "thread per active connection" model).
| Modifier and Type | Class and Description |
|---|---|
| public class | CloseInfo
A record that captures error code and error reason. |
| public abstract class | ProtocolSession
Represents an established stateful connection with a remote peer for a specific QUIC connection ID. Differently from |
| public class | QuicConfiguration
A record that captures QUIC configuration parameters. |
| public abstract class | QuicConnection
A |
| public abstract class | QuicSession
Represents a logical connection with a remote peer, identified by a QUIC connection ID. Each QuicSession maintains a number of QUIC streams, identified by their QUIC stream ID;
Each QUIC stream is wrapped in an |
| public class | QuicSessionContainer
A container that tracks |
| public class | QuicStreamEndPoint
An |
| Modifier and Type | Enum and Description |
|---|---|
| public enum | |
| public enum | StreamType
The QUIC stream type, either client or server initiated, and either unidirectional or bidirectional. |