Home / Class/ DatagramUnicastTest Class — netty Architecture

DatagramUnicastTest Class — netty Architecture

Architecture documentation for the DatagramUnicastTest class in DatagramUnicastTest.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  fe4d45b3_9e9e_2ee9_7d60_26b49241d521["DatagramUnicastTest"]
  45663dc6_be88_3170_9ba9_f467c1bf0c4d["DatagramUnicastTest.java"]
  fe4d45b3_9e9e_2ee9_7d60_26b49241d521 -->|defined in| 45663dc6_be88_3170_9ba9_f467c1bf0c4d
  4619a2b8_5732_7bea_1716_48371e18fb1f["testSimpleSendDirectByteBuf()"]
  fe4d45b3_9e9e_2ee9_7d60_26b49241d521 -->|method| 4619a2b8_5732_7bea_1716_48371e18fb1f
  13078524_ee26_bc8a_a17a_c9acd6cfa908["testSimpleSendHeapByteBuf()"]
  fe4d45b3_9e9e_2ee9_7d60_26b49241d521 -->|method| 13078524_ee26_bc8a_a17a_c9acd6cfa908
  fe40f4ed_2c2f_828c_eb81_b3362430a0f0["testSimpleSendCompositeDirectByteBuf()"]
  fe4d45b3_9e9e_2ee9_7d60_26b49241d521 -->|method| fe40f4ed_2c2f_828c_eb81_b3362430a0f0
  dcc59760_f1af_1fd1_d99b_a7ff8f4e863f["testSimpleSendCompositeHeapByteBuf()"]
  fe4d45b3_9e9e_2ee9_7d60_26b49241d521 -->|method| dcc59760_f1af_1fd1_d99b_a7ff8f4e863f
  1e094599_e3d1_5ae3_66e9_65371510a58b["testSimpleSendCompositeMixedByteBuf()"]
  fe4d45b3_9e9e_2ee9_7d60_26b49241d521 -->|method| 1e094599_e3d1_5ae3_66e9_65371510a58b
  1b3db84c_4e3a_33b2_5e84_377b91ebd881["testSimpleSendWithoutBind()"]
  fe4d45b3_9e9e_2ee9_7d60_26b49241d521 -->|method| 1b3db84c_4e3a_33b2_5e84_377b91ebd881
  1d29f357_d8d7_aeac_be4e_38529bf16434["testSimpleSend()"]
  fe4d45b3_9e9e_2ee9_7d60_26b49241d521 -->|method| 1d29f357_d8d7_aeac_be4e_38529bf16434
  91adde55_18a9_ce71_735d_5273e446363a["testSimpleSendWithConnect()"]
  fe4d45b3_9e9e_2ee9_7d60_26b49241d521 -->|method| 91adde55_18a9_ce71_735d_5273e446363a
  b542c8bb_dc13_f8ff_f4d0_58ca0509c782["testReceiveEmptyDatagrams()"]
  fe4d45b3_9e9e_2ee9_7d60_26b49241d521 -->|method| b542c8bb_dc13_f8ff_f4d0_58ca0509c782
  ae7bed05_7e3e_9510_a657_1ebb908cd06d["testSendToUnresolvableAddress()"]
  fe4d45b3_9e9e_2ee9_7d60_26b49241d521 -->|method| ae7bed05_7e3e_9510_a657_1ebb908cd06d
  955359d9_42c9_1060_17ef_af523c9e5229["testSimpleSend0()"]
  fe4d45b3_9e9e_2ee9_7d60_26b49241d521 -->|method| 955359d9_42c9_1060_17ef_af523c9e5229
  2802b3c5_22da_5cb7_ef38_e095fc126972["testSimpleSendWithConnect0()"]
  fe4d45b3_9e9e_2ee9_7d60_26b49241d521 -->|method| 2802b3c5_22da_5cb7_ef38_e095fc126972
  505f9cb6_a6a1_520e_2c23_70e04313e67d["ChannelFuture()"]
  fe4d45b3_9e9e_2ee9_7d60_26b49241d521 -->|method| 505f9cb6_a6a1_520e_2c23_70e04313e67d

Relationship Graph

Source Code

testsuite/src/main/java/io/netty/testsuite/transport/socket/DatagramUnicastTest.java lines 62–498

public abstract class DatagramUnicastTest extends AbstractDatagramTest {

    private static final byte[] BYTES = {0, 1, 2, 3};
    protected enum WrapType {
        NONE, DUP, SLICE, READ_ONLY
    }

    @Test
    public void testSimpleSendDirectByteBuf(TestInfo testInfo) throws Throwable {
        run(testInfo, new Runner<Bootstrap, Bootstrap>() {
            @Override
            public void run(Bootstrap bootstrap, Bootstrap bootstrap2) throws Throwable {
                testSimpleSendDirectByteBuf(bootstrap, bootstrap2);
            }
        });
    }

    public void testSimpleSendDirectByteBuf(Bootstrap sb, Bootstrap cb) throws Throwable {
        testSimpleSend(sb, cb, Unpooled.directBuffer().writeBytes(BYTES), true, BYTES, 1);
        testSimpleSend(sb, cb, Unpooled.directBuffer().writeBytes(BYTES), true, BYTES, 4);
    }

    @Test
    public void testSimpleSendHeapByteBuf(TestInfo testInfo) throws Throwable {
        run(testInfo, new Runner<Bootstrap, Bootstrap>() {
            @Override
            public void run(Bootstrap bootstrap, Bootstrap bootstrap2) throws Throwable {
                testSimpleSendHeapByteBuf(bootstrap, bootstrap2);
            }
        });
    }

    public void testSimpleSendHeapByteBuf(Bootstrap sb, Bootstrap cb) throws Throwable {
        testSimpleSend(sb, cb, Unpooled.buffer().writeBytes(BYTES), true, BYTES, 1);
        testSimpleSend(sb, cb, Unpooled.buffer().writeBytes(BYTES), true, BYTES, 4);
    }

    @Test
    public void testSimpleSendCompositeDirectByteBuf(TestInfo testInfo) throws Throwable {
        run(testInfo, new Runner<Bootstrap, Bootstrap>() {
            @Override
            public void run(Bootstrap bootstrap, Bootstrap bootstrap2) throws Throwable {
                testSimpleSendCompositeDirectByteBuf(bootstrap, bootstrap2);
            }
        });
    }

    public void testSimpleSendCompositeDirectByteBuf(Bootstrap sb, Bootstrap cb) throws Throwable {
        CompositeByteBuf buf = Unpooled.compositeBuffer();
        buf.addComponent(true, Unpooled.directBuffer().writeBytes(BYTES, 0, 2));
        buf.addComponent(true, Unpooled.directBuffer().writeBytes(BYTES, 2, 2));
        testSimpleSend(sb, cb, buf, true, BYTES, 1);

        CompositeByteBuf buf2 = Unpooled.compositeBuffer();
        buf2.addComponent(true, Unpooled.directBuffer().writeBytes(BYTES, 0, 2));
        buf2.addComponent(true, Unpooled.directBuffer().writeBytes(BYTES, 2, 2));
        testSimpleSend(sb, cb, buf2, true, BYTES, 4);
    }

    @Test
    public void testSimpleSendCompositeHeapByteBuf(TestInfo testInfo) throws Throwable {
        run(testInfo, new Runner<Bootstrap, Bootstrap>() {
            @Override
            public void run(Bootstrap bootstrap, Bootstrap bootstrap2) throws Throwable {
                testSimpleSendCompositeHeapByteBuf(bootstrap, bootstrap2);
            }
        });
    }

    public void testSimpleSendCompositeHeapByteBuf(Bootstrap sb, Bootstrap cb) throws Throwable {
        CompositeByteBuf buf = Unpooled.compositeBuffer();
        buf.addComponent(true, Unpooled.buffer().writeBytes(BYTES, 0, 2));
        buf.addComponent(true, Unpooled.buffer().writeBytes(BYTES, 2, 2));
        testSimpleSend(sb, cb, buf, true, BYTES, 1);

        CompositeByteBuf buf2 = Unpooled.compositeBuffer();
        buf2.addComponent(true, Unpooled.buffer().writeBytes(BYTES, 0, 2));
        buf2.addComponent(true, Unpooled.buffer().writeBytes(BYTES, 2, 2));
        testSimpleSend(sb, cb, buf2, true, BYTES, 4);
    }

Frequently Asked Questions

What is the DatagramUnicastTest class?
DatagramUnicastTest is a class in the netty codebase, defined in testsuite/src/main/java/io/netty/testsuite/transport/socket/DatagramUnicastTest.java.
Where is DatagramUnicastTest defined?
DatagramUnicastTest is defined in testsuite/src/main/java/io/netty/testsuite/transport/socket/DatagramUnicastTest.java at line 62.

Analyze Your Own Codebase

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

Try Supermodel Free