Class QuicConnection

java.lang.Object
org.eclipse.jetty.io.AbstractConnection
org.eclipse.jetty.quic.common.QuicConnection
All Implemented Interfaces:
Closeable, AutoCloseable, org.eclipse.jetty.io.Connection

public abstract class QuicConnection extends org.eclipse.jetty.io.AbstractConnection

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

The received bytes are peeked to obtain the QUIC connection ID; each QUIC connection ID has an associated QuicSession, and the received bytes are then passed to the QuicSession for processing.

On the receive side, one QuicConnection fans-out to multiple QuicSessions.

On the send side, many QuicSessions fan-in to one QuicConnection.

  • Constructor Details

    • QuicConnection

      protected QuicConnection(Executor executor, org.eclipse.jetty.util.thread.Scheduler scheduler, org.eclipse.jetty.io.ByteBufferPool byteBufferPool, org.eclipse.jetty.io.EndPoint endPoint)
  • Method Details

    • getEndPoint

      public org.eclipse.jetty.io.DatagramChannelEndPoint getEndPoint()
      Specified by:
      getEndPoint in interface org.eclipse.jetty.io.Connection
      Overrides:
      getEndPoint in class org.eclipse.jetty.io.AbstractConnection
    • getScheduler

      public org.eclipse.jetty.util.thread.Scheduler getScheduler()
    • getByteBufferPool

      public org.eclipse.jetty.io.ByteBufferPool getByteBufferPool()
    • getOutputBufferSize

      public int getOutputBufferSize()
    • setOutputBufferSize

      public void setOutputBufferSize(int outputBufferSize)
    • isUseInputDirectByteBuffers

      public boolean isUseInputDirectByteBuffers()
    • setUseInputDirectByteBuffers

      public void setUseInputDirectByteBuffers(boolean useInputDirectByteBuffers)
    • isUseOutputDirectByteBuffers

      public boolean isUseOutputDirectByteBuffers()
    • setUseOutputDirectByteBuffers

      public void setUseOutputDirectByteBuffers(boolean useOutputDirectByteBuffers)
    • getQuicSessions

      public Collection<QuicSession> getQuicSessions()
    • addEventListener

      public void addEventListener(EventListener listener)
      Specified by:
      addEventListener in interface org.eclipse.jetty.io.Connection
      Overrides:
      addEventListener in class org.eclipse.jetty.io.AbstractConnection
    • removeEventListener

      public void removeEventListener(EventListener listener)
      Specified by:
      removeEventListener in interface org.eclipse.jetty.io.Connection
      Overrides:
      removeEventListener in class org.eclipse.jetty.io.AbstractConnection
    • onOpen

      public void onOpen()
      Specified by:
      onOpen in interface org.eclipse.jetty.io.Connection
      Overrides:
      onOpen in class org.eclipse.jetty.io.AbstractConnection
    • onClose

      public void onClose(Throwable cause)
      Specified by:
      onClose in interface org.eclipse.jetty.io.Connection
      Overrides:
      onClose in class org.eclipse.jetty.io.AbstractConnection
    • onFillable

      public void onFillable()
      Specified by:
      onFillable in class org.eclipse.jetty.io.AbstractConnection
    • fillInterested

      public void fillInterested()
      Overrides:
      fillInterested in class org.eclipse.jetty.io.AbstractConnection
    • onIdleExpired

      public abstract boolean onIdleExpired()
      Specified by:
      onIdleExpired in interface org.eclipse.jetty.io.Connection
      Overrides:
      onIdleExpired in class org.eclipse.jetty.io.AbstractConnection
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Specified by:
      close in interface org.eclipse.jetty.io.Connection
      Overrides:
      close in class org.eclipse.jetty.io.AbstractConnection
    • outwardClose

      public void outwardClose(QuicSession session, Throwable failure)
    • createSession

      protected abstract QuicSession createSession(SocketAddress remoteAddress, ByteBuffer cipherBuffer) throws IOException
      Throws:
      IOException
    • write

      public void write(org.eclipse.jetty.util.Callback callback, SocketAddress remoteAddress, ByteBuffer... buffers)
    • onFailure

      protected void onFailure(Throwable failure)