Home / Function/ testIp6() — netty Function Reference

testIp6() — netty Function Reference

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

Entity Profile

Dependency Diagram

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

Relationship Graph

Source Code

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

    @Test
    public void testIp6() throws Exception {
        CleanableDirectBuffer cleanableDirectBuffer = allocateDirectBufferWithNativeOrder(64);
        ByteBuffer buffer = cleanableDirectBuffer.buffer();
        try {
            Inet6Address address = Inet6Address.getByAddress(
                    null, new byte[] { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }, 12345);
            int port = 45678;
            assertEquals(Native.SIZEOF_SOCKADDR_IN6, SockaddrIn.setIPv6(buffer, address, port));
            byte[] ipv6Bytes = new byte[16];
            byte[] ipv4Bytes = new byte[4];

            InetSocketAddress sockAddr = SockaddrIn.getIPv6(buffer, ipv6Bytes, ipv4Bytes);
            Inet6Address inet6Address = (Inet6Address) sockAddr.getAddress();
            assertArrayEquals(address.getAddress(), inet6Address.getAddress());
            assertEquals(address.getScopeId(), inet6Address.getScopeId());
            assertEquals(port, sockAddr.getPort());
        } finally {
            cleanableDirectBuffer.clean();
        }
    }

Domain

Subdomains

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free