Home / Function/ testRawOption() — netty Function Reference

testRawOption() — netty Function Reference

Architecture documentation for the testRawOption() function in IoUringChannelConfigTest.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  bc77c788_e93d_589b_c2f4_00a0e1c429dd["testRawOption()"]
  d5a07f05_de7b_2513_eb07_6caa0049ae1e["IoUringChannelConfigTest"]
  bc77c788_e93d_589b_c2f4_00a0e1c429dd -->|defined in| d5a07f05_de7b_2513_eb07_6caa0049ae1e
  style bc77c788_e93d_589b_c2f4_00a0e1c429dd fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

transport-native-io_uring/src/test/java/io/netty/channel/uring/IoUringChannelConfigTest.java lines 48–69

    @Test
    public void testRawOption() throws Exception {
        IoUringSocketChannel channel = new IoUringSocketChannel();
        // Value for SOL_SOCKET and SO_REUSEADDR
        // See https://github.com/torvalds/linux/blob/v5.17/include/uapi/asm-generic/socket.h
        RawUnixChannelOption opt = new RawUnixChannelOption("RAW_OPT", 1, 2, 4);

        CleanableDirectBuffer disabledCleanable = Buffer.allocateDirectBufferWithNativeOrder(4);
        ByteBuffer disabled = disabledCleanable.buffer();
        disabled.putInt(0).flip();
        assertEquals(disabled, channel.config().getOption(opt));

        CleanableDirectBuffer enabledCleanable = Buffer.allocateDirectBufferWithNativeOrder(4);
        ByteBuffer enabled = enabledCleanable.buffer();
        enabled.putInt(1).flip();

        channel.config().setOption(opt, enabled);
        assertNotEquals(disabled, channel.config().getOption(opt));
        channel.fd().close();
        disabledCleanable.clean();
        enabledCleanable.clean();
    }

Domain

Subdomains

Frequently Asked Questions

What does testRawOption() do?
testRawOption() is a function in the netty codebase, defined in transport-native-io_uring/src/test/java/io/netty/channel/uring/IoUringChannelConfigTest.java.
Where is testRawOption() defined?
testRawOption() is defined in transport-native-io_uring/src/test/java/io/netty/channel/uring/IoUringChannelConfigTest.java at line 48.

Analyze Your Own Codebase

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

Try Supermodel Free