QuicheQuicClientCodec Class — netty Architecture
Architecture documentation for the QuicheQuicClientCodec class in QuicheQuicClientCodec.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 490ebf21_719a_74a9_110c_e72ae68168c5["QuicheQuicClientCodec"] b61cbae7_cab1_df85_2f59_04f623a90e3e["QuicheQuicClientCodec.java"] 490ebf21_719a_74a9_110c_e72ae68168c5 -->|defined in| b61cbae7_cab1_df85_2f59_04f623a90e3e faf14578_ab28_f81e_4d2e_9ab39088bd61["QuicheQuicClientCodec()"] 490ebf21_719a_74a9_110c_e72ae68168c5 -->|method| faf14578_ab28_f81e_4d2e_9ab39088bd61 1d5633ea_ee38_0af0_92a2_e6fc94987af4["QuicheQuicChannel()"] 490ebf21_719a_74a9_110c_e72ae68168c5 -->|method| 1d5633ea_ee38_0af0_92a2_e6fc94987af4 5c7a8835_65cd_f25b_46e4_1508eee7ec48["connectQuicChannel()"] 490ebf21_719a_74a9_110c_e72ae68168c5 -->|method| 5c7a8835_65cd_f25b_46e4_1508eee7ec48
Relationship Graph
Source Code
codec-classes-quic/src/main/java/io/netty/handler/codec/quic/QuicheQuicClientCodec.java lines 33–78
final class QuicheQuicClientCodec extends QuicheQuicCodec {
private final Function<QuicChannel, ? extends QuicSslEngine> sslEngineProvider;
private final Executor sslTaskExecutor;
QuicheQuicClientCodec(QuicheConfig config, Function<QuicChannel, ? extends QuicSslEngine> sslEngineProvider,
Executor sslTaskExecutor, int localConnIdLength, FlushStrategy flushStrategy) {
// Let's just use Quic.MAX_DATAGRAM_SIZE as the maximum size for a token on the client side. This should be
// safe enough and as we not have too many codecs at the same time this should be ok.
super(config, localConnIdLength, flushStrategy);
this.sslEngineProvider = sslEngineProvider;
this.sslTaskExecutor = sslTaskExecutor;
}
@Override
@Nullable
protected QuicheQuicChannel quicPacketRead(
ChannelHandlerContext ctx, InetSocketAddress sender, InetSocketAddress recipient,
QuicPacketType type, long version, ByteBuf scid, ByteBuf dcid,
ByteBuf token, ByteBuf senderSockaddrMemory, ByteBuf recipientSockaddrMemory,
Consumer<QuicheQuicChannel> freeTask, int localConnIdLength, QuicheConfig config) {
ByteBuffer key = dcid.internalNioBuffer(dcid.readerIndex(), dcid.readableBytes());
return getChannel(key);
}
@Override
protected void connectQuicChannel(QuicheQuicChannel channel, SocketAddress remoteAddress,
SocketAddress localAddress, ByteBuf senderSockaddrMemory,
ByteBuf recipientSockaddrMemory, Consumer<QuicheQuicChannel> freeTask,
int localConnIdLength, QuicheConfig config, ChannelPromise promise) {
try {
channel.connectNow(sslEngineProvider, sslTaskExecutor, freeTask, config.nativeAddress(),
localConnIdLength, config.isDatagramSupported(),
senderSockaddrMemory.internalNioBuffer(0, senderSockaddrMemory.capacity()),
recipientSockaddrMemory.internalNioBuffer(0, recipientSockaddrMemory.capacity()));
} catch (Throwable cause) {
// Only fail the original promise. Cleanup will be done as part of the listener attached to it.
promise.setFailure(cause);
return;
}
addChannel(channel);
channel.finishConnect();
promise.setSuccess();
}
}
Source
Frequently Asked Questions
What is the QuicheQuicClientCodec class?
QuicheQuicClientCodec is a class in the netty codebase, defined in codec-classes-quic/src/main/java/io/netty/handler/codec/quic/QuicheQuicClientCodec.java.
Where is QuicheQuicClientCodec defined?
QuicheQuicClientCodec is defined in codec-classes-quic/src/main/java/io/netty/handler/codec/quic/QuicheQuicClientCodec.java at line 33.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free