initChannel() — netty Function Reference
Architecture documentation for the initChannel() function in Http3PushStreamServerInitializer.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 27446036_bdb8_8391_0927_55f5a35d44ff["initChannel()"] 5411b28f_c5aa_5274_8700_02211c848104["Http3PushStreamServerInitializer"] 27446036_bdb8_8391_0927_55f5a35d44ff -->|defined in| 5411b28f_c5aa_5274_8700_02211c848104 8e7232b8_925c_b8c8_c701_467fd4bd4f50["initPushStream()"] 27446036_bdb8_8391_0927_55f5a35d44ff -->|calls| 8e7232b8_925c_b8c8_c701_467fd4bd4f50 style 27446036_bdb8_8391_0927_55f5a35d44ff fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
codec-http3/src/main/java/io/netty/handler/codec/http3/Http3PushStreamServerInitializer.java lines 40–70
@Override
protected final void initChannel(QuicStreamChannel ch) {
if (!isServerInitiatedQuicStream(ch)) {
throw new IllegalArgumentException("Using server push stream initializer for client stream: " +
ch.streamId());
}
Http3CodecUtils.verifyIsUnidirectional(ch);
// We need to write stream type into the stream before doing anything else.
// See https://tools.ietf.org/html/draft-ietf-quic-http-32#section-6.2.1
// Just allocate 16 bytes which would be the max needed to write 2 variable length ints.
ByteBuf buffer = ch.alloc().buffer(16);
writeVariableLengthInteger(buffer, Http3CodecUtils.HTTP3_PUSH_STREAM_TYPE);
writeVariableLengthInteger(buffer, pushId);
ch.write(buffer);
Http3ConnectionHandler connectionHandler = Http3CodecUtils.getConnectionHandlerOrClose(ch.parent());
if (connectionHandler == null) {
// connection should have been closed
return;
}
ChannelPipeline pipeline = ch.pipeline();
Http3RequestStreamEncodeStateValidator encodeStateValidator = new Http3RequestStreamEncodeStateValidator();
// Add the encoder and decoder in the pipeline so we can handle Http3Frames
pipeline.addLast(connectionHandler.newCodec(encodeStateValidator, NO_STATE));
pipeline.addLast(encodeStateValidator);
// Add the handler that will validate what we write and receive on this stream.
pipeline.addLast(connectionHandler.newPushStreamValidationHandler(ch, NO_STATE));
initPushStream(ch);
}
Domain
Subdomains
Defined In
Calls
Source
Frequently Asked Questions
What does initChannel() do?
initChannel() is a function in the netty codebase, defined in codec-http3/src/main/java/io/netty/handler/codec/http3/Http3PushStreamServerInitializer.java.
Where is initChannel() defined?
initChannel() is defined in codec-http3/src/main/java/io/netty/handler/codec/http3/Http3PushStreamServerInitializer.java at line 40.
What does initChannel() call?
initChannel() calls 1 function(s): initPushStream.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free