Home / Function/ supportIanaStatusCodes() — netty Function Reference

supportIanaStatusCodes() — netty Function Reference

Architecture documentation for the supportIanaStatusCodes() function in WebSocket08FrameDecoderTest.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  f49a613b_1ebd_1a40_90bb_cdde736b36ff["supportIanaStatusCodes()"]
  30e9dec2_7c00_6d6f_80a0_7f9595928d39["WebSocket08FrameDecoderTest"]
  f49a613b_1ebd_1a40_90bb_cdde736b36ff -->|defined in| 30e9dec2_7c00_6d6f_80a0_7f9595928d39
  style f49a613b_1ebd_1a40_90bb_cdde736b36ff fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

codec-http/src/test/java/io/netty/handler/codec/http/websocketx/WebSocket08FrameDecoderTest.java lines 43–75

    @Test
    public void supportIanaStatusCodes() throws Exception {
        Set<Integer> forbiddenIanaCodes = new HashSet<Integer>();
        forbiddenIanaCodes.add(1004);
        forbiddenIanaCodes.add(1005);
        forbiddenIanaCodes.add(1006);
        Set<Integer> validIanaCodes = new HashSet<Integer>();
        for (int i = 1000; i < 1015; i++) {
            validIanaCodes.add(i);
        }
        validIanaCodes.removeAll(forbiddenIanaCodes);

        for (int statusCode: validIanaCodes) {
            EmbeddedChannel encoderChannel = new EmbeddedChannel(new WebSocket08FrameEncoder(true));
            EmbeddedChannel decoderChannel = new EmbeddedChannel(new WebSocket08FrameDecoder(true, true, 65535, false));

            assertTrue(encoderChannel.writeOutbound(new CloseWebSocketFrame(statusCode, "Bye")));
            assertTrue(encoderChannel.finish());
            ByteBuf serializedCloseFrame = encoderChannel.readOutbound();
            assertNull(encoderChannel.readOutbound());

            assertTrue(decoderChannel.writeInbound(serializedCloseFrame));
            assertTrue(decoderChannel.finish());

            CloseWebSocketFrame outputFrame = decoderChannel.readInbound();
            assertNull(decoderChannel.readOutbound());
            try {
                assertEquals(statusCode, outputFrame.statusCode());
            } finally {
                outputFrame.release();
            }
        }
    }

Domain

Subdomains

Frequently Asked Questions

What does supportIanaStatusCodes() do?
supportIanaStatusCodes() is a function in the netty codebase, defined in codec-http/src/test/java/io/netty/handler/codec/http/websocketx/WebSocket08FrameDecoderTest.java.
Where is supportIanaStatusCodes() defined?
supportIanaStatusCodes() is defined in codec-http/src/test/java/io/netty/handler/codec/http/websocketx/WebSocket08FrameDecoderTest.java at line 43.

Analyze Your Own Codebase

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

Try Supermodel Free