Home / Function/ writeAllData() — netty Function Reference

writeAllData() — netty Function Reference

Architecture documentation for the writeAllData() function in QuicChannelEchoTest.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  39d53d07_1929_f59b_be60_a52cbdc52542["writeAllData()"]
  949dbf36_222b_a1d5_95aa_68ae528fcaf5["QuicChannelEchoTest"]
  39d53d07_1929_f59b_be60_a52cbdc52542 -->|defined in| 949dbf36_222b_a1d5_95aa_68ae528fcaf5
  b6b62dd4_732e_55a3_c880_96407c90f51b["testEchoStartedFromServer()"]
  b6b62dd4_732e_55a3_c880_96407c90f51b -->|calls| 39d53d07_1929_f59b_be60_a52cbdc52542
  517fed06_cd16_bd40_97ea_e48339ad0706["testEchoStartedFromClient()"]
  517fed06_cd16_bd40_97ea_e48339ad0706 -->|calls| 39d53d07_1929_f59b_be60_a52cbdc52542
  style 39d53d07_1929_f59b_be60_a52cbdc52542 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

codec-native-quic/src/test/java/io/netty/handler/codec/quic/QuicChannelEchoTest.java lines 311–331

    private List<ChannelFuture> writeAllData(Channel channel, boolean composite, ByteBufAllocator allocator) {
        if (composite) {
            CompositeByteBuf compositeByteBuf = allocator.compositeBuffer();
            for (int i = 0; i < data.length;) {
                int length = Math.min(random.nextInt(1024 * 64), data.length - i);
                ByteBuf buf = allocator.buffer().writeBytes(data, i, length);
                compositeByteBuf.addComponent(true, buf);
                i += length;
            }
            return Collections.singletonList(channel.writeAndFlush(compositeByteBuf));
        } else {
            List<ChannelFuture> futures = new ArrayList<>();
            for (int i = 0; i < data.length;) {
                int length = Math.min(random.nextInt(1024 * 64), data.length - i);
                ByteBuf buf = allocator.buffer().writeBytes(data, i, length);
                futures.add(channel.writeAndFlush(buf));
                i += length;
            }
            return futures;
        }
    }

Domain

Subdomains

Frequently Asked Questions

What does writeAllData() do?
writeAllData() is a function in the netty codebase, defined in codec-native-quic/src/test/java/io/netty/handler/codec/quic/QuicChannelEchoTest.java.
Where is writeAllData() defined?
writeAllData() is defined in codec-native-quic/src/test/java/io/netty/handler/codec/quic/QuicChannelEchoTest.java at line 311.
What calls writeAllData()?
writeAllData() is called by 2 function(s): testEchoStartedFromClient, testEchoStartedFromServer.

Analyze Your Own Codebase

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

Try Supermodel Free