Class QuicheConnection
- All Implemented Interfaces:
Closeable
,AutoCloseable
,Connection
A Connection
implementation that receives and sends datagram packets via its associated DatagramChannelEndPoint
.
On the client, there is one datagram endpoint for every connection initiated by the client.
On the server, there is one datagram endpoint only for all connections from all clients.
The received bytes are peeked to obtain the QUIC connection ID; each QUIC connection ID has an associated
QuicheSession
, and the received bytes are then passed to the QuicheSession
for processing.
On the receive side, one QuicheConnection fans-out to multiple QuicheSession
s.
On the send side, many QuicheSession
s fan-in to one QuicheConnection.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.eclipse.jetty.io.AbstractConnection
AbstractConnection.NonBlocking
Nested classes/interfaces inherited from interface org.eclipse.jetty.io.Connection
Connection.Listener, Connection.Tunnel, Connection.UpgradeFrom, Connection.UpgradeTo
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
QuicheConnection
(Executor executor, Scheduler scheduler, ByteBufferPool bufferPool, EndPoint endPoint) -
Method Summary
Modifier and TypeMethodDescriptionabstract void
disconnect
(QuicheSession session, ConnectionCloseFrame frame, Throwable failure) void
Registers read interest using the defaultCallback
withInvocable.InvocationType.BLOCKING
.abstract boolean
onIdleExpired
(TimeoutException timeoutException) Callback method invoked upon an idle timeout event.abstract void
write
(Callback callback, SocketAddress remoteAddress, ByteBuffer... buffers) Methods inherited from class org.eclipse.jetty.io.AbstractConnection
addEventListener, close, fillInterested, getBytesIn, getBytesOut, getCreatedTimeStamp, getEndPoint, getExecutor, getInputBufferSize, getMessagesIn, getMessagesOut, isFillInterested, onClose, onFillable, onFillInterestedFailed, onOpen, onReadTimeout, removeEventListener, setInputBufferSize, toConnectionString, toString, tryFillInterested
-
Constructor Details
-
QuicheConnection
protected QuicheConnection(Executor executor, Scheduler scheduler, ByteBufferPool bufferPool, EndPoint endPoint)
-
-
Method Details
-
getScheduler
-
getByteBufferPool
-
fillInterested
public void fillInterested()Description copied from class:AbstractConnection
Registers read interest using the default
Callback
withInvocable.InvocationType.BLOCKING
.When read readiness is signaled,
AbstractConnection.onFillable()
orAbstractConnection.onFillInterestedFailed(Throwable)
will be invoked.This method should be used sparingly, mainly from
AbstractConnection.onOpen()
, andAbstractConnection.fillInterested(Callback)
should be preferred instead, passing aCallback
that specifies theInvocable.InvocationType
for each specific case where read interest needs to be registered.- Overrides:
fillInterested
in classAbstractConnection
- See Also:
-
write
-
onIdleExpired
Description copied from interface:Connection
Callback method invoked upon an idle timeout event.
Implementations of this method may return true to indicate that the idle timeout handling should proceed normally, typically failing the EndPoint and causing it to be closed.
When false is returned, the handling of the idle timeout event is halted immediately and the EndPoint left in the state it was before the idle timeout event.
- Specified by:
onIdleExpired
in interfaceConnection
- Overrides:
onIdleExpired
in classAbstractConnection
- Returns:
- true to let the EndPoint handle the idle timeout, false to tell the EndPoint to halt the handling of the idle timeout.
-
disconnect
public abstract void disconnect(QuicheSession session, ConnectionCloseFrame frame, Throwable failure)
-