Home / Function/ main() — netty Function Reference

main() — netty Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  860d8561_a1bb_23ff_6c07_2e9bea82ddbc["main()"]
  40abcc0a_1b6f_95df_e40b_99a4345531f2["QuicClientZeroRTTExample"]
  860d8561_a1bb_23ff_6c07_2e9bea82ddbc -->|defined in| 40abcc0a_1b6f_95df_e40b_99a4345531f2
  0b50309a_9360_0fb3_1b8d_1c4a3d1ac0ab["newChannelAndSendData()"]
  860d8561_a1bb_23ff_6c07_2e9bea82ddbc -->|calls| 0b50309a_9360_0fb3_1b8d_1c4a3d1ac0ab
  f2361233_d807_e21f_32f0_2702a50cf848["createStream()"]
  860d8561_a1bb_23ff_6c07_2e9bea82ddbc -->|calls| f2361233_d807_e21f_32f0_2702a50cf848
  style 860d8561_a1bb_23ff_6c07_2e9bea82ddbc 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 50–70

    public static void main(String[] args) throws Exception {
        QuicSslContext context = QuicSslContextBuilder.forClient().trustManager(InsecureTrustManagerFactory.INSTANCE).
                applicationProtocols("http/0.9").earlyData(true).build();

        newChannelAndSendData(context, null);
        newChannelAndSendData(context, new ChannelInboundHandlerAdapter() {
            @Override
            public void userEventTriggered(ChannelHandlerContext ctx, Object evt) throws Exception {
                if (evt instanceof SslEarlyDataReadyEvent) {
                    createStream((QuicChannel) ctx.channel()).addListener(f -> {
                        if (f.isSuccess()) {
                            QuicStreamChannel streamChannel = (QuicStreamChannel) f.getNow();
                            streamChannel.writeAndFlush(
                                    Unpooled.copiedBuffer("0rtt stream data\r\n", CharsetUtil.US_ASCII));
                        }
                    });
                }
                super.userEventTriggered(ctx, evt);
            }
        });
    }

Domain

Subdomains

Frequently Asked Questions

What does main() do?
main() 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 main() defined?
main() is defined in codec-native-quic/src/test/java/io/netty/handler/codec/quic/example/QuicClientZeroRTTExample.java at line 50.
What does main() call?
main() calls 2 function(s): createStream, newChannelAndSendData.

Analyze Your Own Codebase

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

Try Supermodel Free