| Modifier and Type | Class and Description |
|---|---|
| protected class | QuicConnectionImpl.
Keeps track of: - handshakeCF the handshake completable future - localInitial the local initial crypto writer queue - peerInitial the peer initial crypto flow - localHandshake the local handshake crypto queue - peerHandshake the peer handshake crypto flow |
| private static record | |
| pack-priv class | QuicConnectionImpl.
A {link QuicTimedEvent} used to interrupt the handshake if no response to the first initial packet is received within a reasonable delay (default is ~ 30s). |
| pack-priv class | QuicConnectionImpl.
A class used to check that 1-RTT received data doesn't exceed the MAX_DATA of the connection |
| pack-priv class | QuicConnectionImpl.
An event loop triggered when stream data is available for sending. |
| public static record | |
| public static record | QuicConnectionImpl.
A protection record contains a packet to encrypt, and a datagram that may already contain encrypted packets. |
| protected class | |
| public abstract static class | QuicConnectionImpl.
An abstraction to represent the connection state as a bit mask. |
| protected class | QuicConnectionImpl.
A state handle is a mutable implementation of |
| Modifier and Type | Field and Description |
|---|---|
| private final AtomicInteger | |
| private final AtomicInteger | |
| private final AtomicInteger | |
| private final ConcurrentLinkedQueue | |
| pack-priv final AtomicInteger | |
| private final String | |
| private final CodingContext | |
| pack-priv final QuicCongestionController | |
| private final QuicConnectionId | |
| private final String | |
| protected final Logger | |
| private volatile QuicPacketDecoder | |
| public static final int | |
| public static final long | |
| public static final long | |
| public static final int | |
| public static final int | |
| public static final int | |
| private volatile QuicPacketEncoder | |
| protected final QuicEndpoint | |
| private final QuicConnectionImpl. | |
| private final ReentrantLock | |
| private final SequentialScheduler | |
| protected final IdleTimeoutManager | |
| private final ConcurrentLinkedQueue | |
| private volatile QuicConnectionId | |
| private final SequentialScheduler | |
| private volatile byte[] | |
| private final long | |
| private final LocalConnIdManager | |
| private final CryptoWriterQueue | |
| private volatile QuicTransportParameters | |
| private final String | |
| private static final int | |
| private static final int | |
| private static final int | |
| private static final int | |
| private static final VarHandle | |
| private static final VarHandle | |
| public static final long | |
| private final int | |
| private volatile QuicConnectionImpl. | |
| private int | |
| private final QuicConnectionImpl. | |
| private final QuicConnectionImpl. | |
| private final QuicVersion | |
| protected final Queue | |
| private final QuicConnectionImpl. | |
| private final Queue | |
| private int | |
| private volatile long | |
| private final InetSocketAddress | |
| private final PeerConnIdManager | |
| private final OrderedFlow. | |
| private volatile QuicTransportParameters | |
| private volatile boolean | |
| private final QuicInstance | |
| private final QuicTLSEngine | |
| private volatile QuicVersion | |
| private static final Random | |
| public static final int | |
| pack-priv final QuicRttEstimator | |
| public static final int | |
| private final AtomicBoolean | |
| private static final VarHandle | |
| private volatile int | |
| private final QuicConnectionImpl. | stateHandle
The state of the quic connection. |
| protected final QuicConnectionStreams | |
| pack-priv final ConnectionTerminatorImpl | |
| protected final QuicTransportParameters | |
| public static final boolean | |
| private static final VarHandle | |
| private volatile boolean | |
| private volatile boolean |
| Access | Constructor and Description |
|---|---|
| protected | QuicConnectionImpl(final QuicVersion firstFlightVersion, final QuicInstance quicInstance, final InetSocketAddress peerAddress, final String peerName, final int peerPort, final SSLParameters sslParameters, final String logTagFormat, final long labelId)
|
| Modifier and Type | Method and Description |
|---|---|
| public boolean | accepts(SocketAddress source)
Overrides default jdk. Returns whether this receiver accepts packets from the given source. |
| private List | |
| public List | activeResetTokens()
Implements jdk. {@return a list of active peer stateless reset tokens for this connection) |
| public void | addRemoteStreamListener(Predicate<? super QuicReceiverStream> streamConsumer)
Implements abstract jdk. Adds a listener that will be invoked when a remote stream is created. |
| protected ByteBuffer | Returns: a newByteBuffer with sufficient space to encrypt
the given packet.the packet to encrypt packet)Allocate a |
| protected ByteBuffer | |
| public NetworkChannel | Returns: the underlyingNetworkChannel used by this connection,
which may be null if the endpoint has not been configured yetReturns the underlying |
| private void | |
| public void | |
| protected CodingContext | |
| protected void | |
| protected final void | |
| pack-priv final Optional | Returns: the datagram containing the QUIC packet with a CONNECTION_CLOSE frame or an empty Optional if the datagram couldn't be constructed.Returns a |
| public int | |
| public List | connectionIds()
Implements jdk. {@return a list of local connectionIds for this connection) |
| public ConnectionTerminator | connectionTerminator()
Implements abstract jdk. Returns the |
| protected void | |
| private static boolean | Returns: true if the packet contains a CONNECTION_CLOSE frame, false otherwisethe QUIC packet packet)Returns true if the packet contains a CONNECTION_CLOSE frame, false otherwise. |
| protected void | continueHandshake()
Retrieves cryptographic messages from TLS engine, enqueues them for sending and starts the transmitter. |
| protected void | |
| private void | |
| private static QuicCongestionController | |
| public void | datagramDiscarded(QuicEndpoint.
Overrides default jdk. 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. |
| public void | datagramDropped(QuicEndpoint.
Overrides default jdk. Called after a datagram has been dropped. |
| protected void | datagramReleased(QuicEndpoint.
the released datagram datagramCalled when a datagram is being released, either from
|
| public void | datagramSent(QuicEndpoint.
Overrides default jdk. Called after a datagram has been written to the socket. |
| pack-priv static String | |
| public String | dbgTag()
Implements abstract jdk. Returns a debug tag to be used with lower level logging. |
| protected QuicPacketDecoder | |
| private void | decrypt(ByteBuffer
a byte buffer containing the incoming packet buffer)Schedule an incoming quic packet for decryption. |
| private long | Returns: the emitted packet number, or -1L if not applicable or not emittedthe packet space manager on behalf
of which the acknowledgement should
be sent. packetSpaceManager, final AckFrame the ACK frame to be sent. ackFrame, final boolean whether a PING frame should be sent. sendPing)Emit a possibly non ACK-eliciting packet containing the given ACK frame. |
| protected PacketEmitter | |
| protected QuicPacketEncoder | |
| public QuicEndpoint | |
| protected void | |
| protected QuicStream | Returns: the stream identified by the givenstreamId, or null.the stream ID streamId)If a stream with this streamId was already created, returns it. |
| private void | |
| public final CompletableFuture | |
| public QuicConnectionId | |
| protected long | Returns: the number of (active) connection ids that this endpoint is willing to accept from the peer for a given connectionReturns the number of (active) connection ids that this endpoint is willing to accept from the peer for a given connection. |
| public int | Returns: the maximum datagram size that can be used on the connection pathReturns the maximum datagram size that can be used on the connection path. |
| protected ByteBuffer | Returns: a newByteBuffer to encode and encrypt packets in a datagramthe maximum size of the datagram size)Returns a new |
| protected long | Returns: the number of (active) connection ids that the peer is willing to accept for a given connectionReturns the number of (active) connection ids that the peer is willing to accept for a given connection. |
| private QuicReceiverStream | Returns: receiver stream, or null if stream is already gonestream ID streamId, long received frame type. Used in QuicTransportException frameType)Gets a receiving stream instance for the given ID, used for processing incoming STREAM, RESET_STREAM and STREAM_DATA_BLOCKED frames. |
| private QuicSenderStream | Returns: sender stream, or null if stream is already gonestream ID streamId, long received frame type. Used in QuicTransportException frameType)Gets a sending stream instance for the given ID, used for processing incoming MAX_STREAM_DATA and STOP_SENDING frames. |
| public QuicTLSEngine | |
| protected void | handleIncomingPeerTransportParams(final QuicTransportParameters
the peer's new quic transport parameter params)Called when new quic transport parameters are available from the peer. |
| protected QuicConnectionImpl. | |
| public CompletableFuture | handshakeReachedPeer()
Implements abstract jdk. {@return a |
| private boolean | Returns: true if queued frames are available for sendingReturns true if queued frames are available for sending. |
| private void | |
| protected void | |
| protected void | |
| protected void | |
| protected void | |
| protected void | |
| protected void | |
| protected void | |
| protected void | |
| protected void | |
| protected void | |
| protected void | |
| protected void | |
| protected void | |
| protected void | |
| protected void | |
| protected void | |
| protected void | |
| protected void | |
| protected void | |
| protected void | |
| protected void | |
| protected int | |
| protected void | |
| protected void | |
| protected void | |
| protected void | |
| protected int | |
| protected void | |
| protected void | |
| protected void | |
| public void | increaseProcessedData(long
amount of data processed diff)Called when frame data is removed from the connection and the amount of data can be added to MAX_DATA window. |
| public void | increaseReceivedData(long diff, long
type of frame received frameType)Called when frame data can be safely added to the amount of data received by the connection for MAX_DATA flow control purpose. |
| private QuicConnectionId | |
| private byte[] | |
| public void | internalProcessIncoming(SocketAddress source, ByteBuffer destConnId, QuicPacket.
|
| public boolean | Returns: true if this connection is a client connectionReturns true if this connection is a client connection. |
| protected boolean | Returns: a boolean value telling whether the datagram in the protection record is completethe protection record protectionRecordReturns a boolean value telling whether the datagram in the protection record is complete. |
| protected boolean | isExistingStreamId(long
the stream id streamId)Returns: true if this stream ID identifies a stream that was already opened |
| protected final boolean | Returns: true if this is a stream initiated locally, and false if this is a stream initiated by the peera stream ID. streamId)Returns true if this is a stream initiated locally, and false if this is a stream initiated by the peer. |
| public boolean | isOpen()
Implements abstract jdk. Returns true if this connection is open. |
| public long | |
| public long | |
| public SocketAddress | Returns: the local address of the quic endpointImplements abstract jdk. Returns the local address of the quic endpoint. |
| public QuicConnectionId | Returns: the local connection idOverrides jdk. Returns the local connection id. |
| pack-priv LocalConnIdManager | |
| public QuicTransportParameters | |
| public String | |
| public final String | |
| private List | Returns: A list ofQuicFrame.the crypto frame crypto, AckFrame the ack frame ack)Compose a list of Quic frames containing a crypto frame and an ack frame, omitting null frames. |
| protected void | |
| protected void | |
| pack-priv final QuicPacket | |
| public long | Returns: the next (higher) max streams limit that should be advertised to the remote peer. Returns0 if the limit should not be increasedtrue if bidirectional stream, false otherwise bidi)Returns the next (higher) max streams limit that should be advertised to the remote peer. |
| public void | notifyTerminalState(long
the id of the stream streamId, QuicStream.the terminal state stateCalled when the receiving part or the sending part of a stream reaches a terminal state. |
| protected QuicEndpoint | onHandshakeCompletion(final QuicTLSEngine.
the result of the handshake resultThis method is called when the handshake is successfully completed. |
| public void | onProcessingError(QuicPacket packet, Throwable
the error that occurred t)Called when a packet couldn't be processed |
| public void | onWriteError(Throwable
the error that occurred t)Implements jdk. Called when a datagram scheduled for writing by this connection could not be written to the network. |
| public CompletableFuture | openNewLocalBidiStream(final Duration limitIncreaseDuration)
Implements abstract jdk. Creates a new locally initiated bidirectional stream. |
| public CompletableFuture | openNewLocalUniStream(final Duration limitIncreaseDuration)
Implements abstract jdk. Creates a new locally initiated unidirectional stream. |
| protected QuicStream | Returns: the remote initiated stream identified by the given stream ID, or nullthe id of the remote stream streamId, long type of the frame received, used in exceptions frameType)Get or open a peer initiated stream with the given stream ID |
| protected QuicConnectionId | Returns: the original connection idReturns the original connection id. This is the original destination connection id that the client generated when connecting to the server for the first time. |
| private void | |
| protected QuicConnectionImpl. | |
| protected PacketSpace | |
| public InetSocketAddress | Returns: the peer address that should be used when sending datagram to the peerImplements abstract jdk. Returns the peer address that should be used when sending datagram to the peer. |
| public QuicConnectionId | |
| pack-priv PeerConnIdManager | |
| public long | Returns: the computed PTO for the current packet number space, adjusted by our max ack delayReturns the computed PTO for the current packet number space, adjusted by our max ack delay. |
| public QuicTransportParameters | |
| public void | processDecrypted(QuicPacket
the decrypted quic packet quicPacket)Called when an incoming packet has been decrypted. |
| protected void | processHandshakePacket(final QuicPacket
the handshake quic packet quicPacket)Called to process an |
| protected int | Returns: the total number of bytes consumedthe incoming packet packet)Process the payload of an incoming handshake packet |
| public void | processIncoming(SocketAddress source, ByteBuffer destConnId, QuicPacket.
Implements jdk. Called when an incoming datagram is received. |
| protected void | processInitialPacket(final QuicPacket
the Quic packet quicPacket)Called to process an |
| protected int | Returns: the total number of bytes consumedthe incoming packet packet)Process the payload of an incoming initial packet |
| protected void | processOneRTTPacket(final QuicPacket
the Quic packet quicPacket)Called to process a |
| protected void | processRetryPacket(final QuicPacket
the retry quic packet quicPacket)Called to process a |
| public void | processStatelessReset()
Implements jdk. Called when a stateless reset token is received. |
| protected void | processVersionNegotiationPacket(final QuicPacket quicPacket)
Called to process a received |
| pack-priv final void | pushDatagram(final QuicConnectionImpl.
a record containing a quic packet to encrypt,
a destination byte buffer, and various offset information. protectionRecordEncrypt an outgoing quic packet. |
| protected void | pushDatagram(final SocketAddress
The destination of this datagram destination, final ByteBuffer The datagram datagram)Calls the |
| private void | pushEncryptedDatagram(final QuicConnectionImpl.
the ProtectionRecord containing the datagram protectionRecordPushes the datagram contained in
the |
| public QuicInstance | |
| public Stream | quicStreams()
Implements abstract jdk. Returns a stream of all currently opened |
| public QuicVersion | |
| private LinkedList | |
| public boolean | removeRemoteStreamListener(Predicate<? super QuicReceiverStream> streamConsumer)
Implements abstract jdk. Removes a listener previously added with |
| public void | requestResetStream(long
the id of the stream that should be reset streamId, long the application error code errorCode)Called to request sending of a RESET_STREAM frame. |
| public void | requestSendMaxStreamData(long
the stream id to be cancelled streamId, long the new max data we are prepared to receive on
this stream maxStreamData)Called to request sending of a MAX_STREAM_DATA frame. |
| public CompletableFuture | requestSendPing()
Implements abstract jdk. Requests to send a PING frame to the peer. |
| private void | retransmit(PacketSpace
the packet space manager on behalf of
which the packet is being retransmitted packetSpaceManager, QuicPacket the unacknowledged packet which should be retransmitted packet, int attempts)Retransmit the given packet on behalf of the given packet space manager. |
| public void | |
| private void | |
| public void | scheduleStopSendingFrame(long
the stream id to be cancelled streamId, long the application error code errorCode)Called to request sending of a STOP_SENDING frame. |
| protected void | send1RTTPacket(final OneRttPacket
The ONERTT packet to send. packet)Invoked to send a ONERTT packet containing stream data or control frames. |
| private boolean | |
| private QuicConnectionImpl. | |
| private boolean | |
| protected static void | setIntParamIfNotSet(final QuicTransportParameters params, final QuicTransportParameters.
|
| public void | shutdown()
Implements jdk. Called to shut a closed connection down. |
| public final CompletableFuture | Returns: A completable future which will be completed when the handshake is completed.Implements abstract jdk. Starts the Quic Handshake. |
| protected void | |
| protected final QuicConnectionImpl. | |
| public void | streamDataAvailableForSending(final Set<Long>
the stream ids streamIds)Signal the connection that some stream data is available for sending on one or more streams. |
| public String | |
| protected boolean | Returns: true if switching to the new version was successfulthe new version that was negotiated negotiated)Switch to a new version after receiving a version negotiation packet. |
| public TerminationCause | terminationCause()
Implements abstract jdk. Returns the |
| public String | |
| public final long | uniqueId()
Overrides jdk. Returns a long identifier that can be used to uniquely
identify a quic connection in the context of the
|
| protected void | |
| protected boolean |