Home / Function/ createStream() — netty Function Reference

createStream() — netty Function Reference

Architecture documentation for the createStream() function in QuicClientZeroRTTExample.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  f2361233_d807_e21f_32f0_2702a50cf848["createStream()"]
  40abcc0a_1b6f_95df_e40b_99a4345531f2["QuicClientZeroRTTExample"]
  f2361233_d807_e21f_32f0_2702a50cf848 -->|defined in| 40abcc0a_1b6f_95df_e40b_99a4345531f2
  860d8561_a1bb_23ff_6c07_2e9bea82ddbc["main()"]
  860d8561_a1bb_23ff_6c07_2e9bea82ddbc -->|calls| f2361233_d807_e21f_32f0_2702a50cf848
  0b50309a_9360_0fb3_1b8d_1c4a3d1ac0ab["newChannelAndSendData()"]
  0b50309a_9360_0fb3_1b8d_1c4a3d1ac0ab -->|calls| f2361233_d807_e21f_32f0_2702a50cf848
  style f2361233_d807_e21f_32f0_2702a50cf848 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

codec-native-quic/src/test/java/io/netty/handler/codec/quic/example/QuicClientZeroRTTExample.java lines 122–142

    static Future<QuicStreamChannel> createStream(QuicChannel quicChannel) {
        return quicChannel.createStream(QuicStreamType.BIDIRECTIONAL,
                new ChannelInboundHandlerAdapter() {
                    @Override
                    public void channelRead(ChannelHandlerContext ctx, Object msg) {
                        ByteBuf byteBuf = (ByteBuf) msg;
                        System.err.println(byteBuf.toString(CharsetUtil.US_ASCII));
                        byteBuf.release();
                    }

                    @Override
                    public void userEventTriggered(ChannelHandlerContext ctx, Object evt) {
                        if (evt == ChannelInputShutdownReadComplete.INSTANCE) {
                            // Close the connection once the remote peer did send the FIN for this stream.
                            ((QuicChannel) ctx.channel().parent()).close(true, 0,
                                    ctx.alloc().directBuffer(16)
                                            .writeBytes(new byte[]{'k', 't', 'h', 'x', 'b', 'y', 'e'}));
                        }
                    }
                });
    }

Domain

Subdomains

Frequently Asked Questions

What does createStream() do?
createStream() is a function in the netty codebase, defined in codec-native-quic/src/test/java/io/netty/handler/codec/quic/example/QuicClientZeroRTTExample.java.
Where is createStream() defined?
createStream() is defined in codec-native-quic/src/test/java/io/netty/handler/codec/quic/example/QuicClientZeroRTTExample.java at line 122.
What calls createStream()?
createStream() is called by 2 function(s): main, newChannelAndSendData.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free