Home / Function/ testIp4() — netty Function Reference

testIp4() — netty Function Reference

Architecture documentation for the testIp4() function in SockaddrInTest.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  9e723469_cea3_bf5e_b9d4_30a73af97c01["testIp4()"]
  f542b96b_70a1_3930_b104_0cabb6a71e80["SockaddrInTest"]
  9e723469_cea3_bf5e_b9d4_30a73af97c01 -->|defined in| f542b96b_70a1_3930_b104_0cabb6a71e80
  style 9e723469_cea3_bf5e_b9d4_30a73af97c01 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

transport-native-io_uring/src/test/java/io/netty/channel/uring/SockaddrInTest.java lines 42–57

    @Test
    public void testIp4() throws Exception {
        CleanableDirectBuffer cleanableDirectBuffer = allocateDirectBufferWithNativeOrder(64);
        ByteBuffer buffer = cleanableDirectBuffer.buffer();
        try {
            InetAddress address = InetAddress.getByAddress(new byte[] { 10, 10, 10, 10 });
            int port = 45678;
            assertEquals(Native.SIZEOF_SOCKADDR_IN, SockaddrIn.setIPv4(buffer, address, port));
            byte[] bytes = new byte[4];
            InetSocketAddress sockAddr = SockaddrIn.getIPv4(buffer, bytes);
            assertArrayEquals(address.getAddress(), sockAddr.getAddress().getAddress());
            assertEquals(port, sockAddr.getPort());
        } finally {
            cleanableDirectBuffer.clean();
        }
    }

Domain

Subdomains

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free