Home / Class/ NativeTest Class — netty Architecture

NativeTest Class — netty Architecture

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

Entity Profile

Dependency Diagram

graph TD
  36eb872b_2162_6b35_c8b6_952562b6ae96["NativeTest"]
  9f7de4ad_eac5_c1e1_db43_c8d52c249ee1["NativeTest.java"]
  36eb872b_2162_6b35_c8b6_952562b6ae96 -->|defined in| 9f7de4ad_eac5_c1e1_db43_c8d52c249ee1
  85aef4b0_e24d_1367_bb1c_5eb266304043["testAddressIpv4()"]
  36eb872b_2162_6b35_c8b6_952562b6ae96 -->|method| 85aef4b0_e24d_1367_bb1c_5eb266304043
  a40dc532_ef30_9e2c_d894_d606a4ade2e0["testAddressIpv6()"]
  36eb872b_2162_6b35_c8b6_952562b6ae96 -->|method| a40dc532_ef30_9e2c_d894_d606a4ade2e0

Relationship Graph

Source Code

transport-native-epoll/src/test/java/io/netty/channel/epoll/NativeTest.java lines 28–51

public class NativeTest {

    @Test
    public void testAddressIpv4() throws Exception {
        InetSocketAddress inetAddress = new InetSocketAddress(NetUtil.LOCALHOST4, 9999);
        byte[] bytes = new byte[8];
        ByteBuffer buffer = ByteBuffer.wrap(bytes);
        buffer.put(inetAddress.getAddress().getAddress());
        buffer.putInt(inetAddress.getPort());
        assertEquals(inetAddress, address(buffer.array(), 0, bytes.length));
    }

    @Test
    public void testAddressIpv6() throws Exception {
        Inet6Address address = NetUtil.LOCALHOST6;
        InetSocketAddress inetAddress = new InetSocketAddress(address, 9999);
        byte[] bytes = new byte[24];
        ByteBuffer buffer = ByteBuffer.wrap(bytes);
        buffer.put(address.getAddress());
        buffer.putInt(address.getScopeId());
        buffer.putInt(inetAddress.getPort());
        assertEquals(inetAddress, address(buffer.array(), 0, bytes.length));
    }
}

Frequently Asked Questions

What is the NativeTest class?
NativeTest is a class in the netty codebase, defined in transport-native-epoll/src/test/java/io/netty/channel/epoll/NativeTest.java.
Where is NativeTest defined?
NativeTest is defined in transport-native-epoll/src/test/java/io/netty/channel/epoll/NativeTest.java at line 28.

Analyze Your Own Codebase

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

Try Supermodel Free