Top Description Classes Enums
module org.eclipse.jetty.quic.common

Package org.eclipse.jetty.quic.common


This module contains the main abstractions for the QUIC protocol.

A org.eclipse.jetty.quic.common.QuicConnection is a org.eclipse.jetty.io.Connection that receives and sends bytes from its underlying org.eclipse.jetty.io.DatagramChannelEndPoint.

A org.eclipse.jetty.quic.common.QuicConnection manages many org.eclipse.jetty.quic.common.QuicSessions, one for each QUIC connection ID.

A org.eclipse.jetty.quic.common.QuicSession manages many QUIC streams, identified by a stream ID and represented by org.eclipse.jetty.quic.common.QuicStreamEndPoint.

A org.eclipse.jetty.quic.common.QuicSession delegates I/O processing to a protocol-specific org.eclipse.jetty.quic.common.ProtocolSession, whose responsibility is to use QUIC streams to implement the protocol-specific I/O processing.

The org.eclipse.jetty.io.Connection associated with each org.eclipse.jetty.quic.common.QuicStreamEndPoint parses the bytes received on the QUIC stream represented by the org.eclipse.jetty.quic.common.QuicStreamEndPoint, 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.eclipse.jetty.quic.common.ProtocolSession 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.eclipse.jetty.quic.common.ProtocolSession 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.eclipse.jetty.io.SocketChannelEndPoint 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.eclipse.jetty.quic.common.ProtocolSession 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 -- ServerHTTP3StreamConnection
where -- 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).

Class Summary

Modifier and TypeClass 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 QuicSession, which is created during the initial phases of connection establishment and it is not specific to a protocol, ProtocolSession is created only when the connection is established, and it is protocol specific, depending on the protocol negotiated during the connection establishment.

public class
QuicConfiguration

A record that captures QUIC configuration parameters.

public abstract class
QuicConnection

A Connection implementation that receives and sends datagram packets via its associated DatagramChannelEndPoint.

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 EndPoint, namely QuicStreamEndPoint.

public class
QuicSessionContainer

A container that tracks QuicSession instances.

public class
QuicStreamEndPoint

An EndPoint implementation on top of a QUIC stream.

Enum Summary

Modifier and TypeEnum and Description
public enum
public enum
StreamType

The QUIC stream type, either client or server initiated, and either unidirectional or bidirectional.