Home / Function/ testCloseReason0() — netty Function Reference

testCloseReason0() — netty Function Reference

Architecture documentation for the testCloseReason0() function in WebSocketServerHandshaker13Test.java from the netty codebase.

Function java Buffer Allocators calls 1 called by 2

Entity Profile

Dependency Diagram

graph TD
  db76d3df_c369_afe2_c78b_74447024f363["testCloseReason0()"]
  b3c12c47_d3a9_1bed_608c_a4b3745e9ee9["WebSocketServerHandshaker13Test"]
  db76d3df_c369_afe2_c78b_74447024f363 -->|defined in| b3c12c47_d3a9_1bed_608c_a4b3745e9ee9
  1bbc4fdb_e2ad_ddc6_1d2f_468924e52bec["testCloseReasonWithEncoderAndDecoder()"]
  1bbc4fdb_e2ad_ddc6_1d2f_468924e52bec -->|calls| db76d3df_c369_afe2_c78b_74447024f363
  f3f4b87f_66cb_42ff_5b65_d4207a1303b8["testCloseReasonWithCodec()"]
  f3f4b87f_66cb_42ff_5b65_d4207a1303b8 -->|calls| db76d3df_c369_afe2_c78b_74447024f363
  9b413e61_113c_d4ee_061a_59cd3c3e3003["testUpgrade0()"]
  db76d3df_c369_afe2_c78b_74447024f363 -->|calls| 9b413e61_113c_d4ee_061a_59cd3c3e3003
  style db76d3df_c369_afe2_c78b_74447024f363 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

codec-http/src/test/java/io/netty/handler/codec/http/websocketx/WebSocketServerHandshaker13Test.java lines 174–193

    private static void testCloseReason0(ChannelHandler... handlers) {
        EmbeddedChannel ch = new EmbeddedChannel(
                new HttpObjectAggregator(42));
        ch.pipeline().addLast(handlers);
        testUpgrade0(ch, new WebSocketServerHandshaker13("ws://example.com/chat", "chat",
                WebSocketDecoderConfig.newBuilder().maxFramePayloadLength(4).closeOnProtocolViolation(true).build()));

        ch.writeOutbound(new BinaryWebSocketFrame(Unpooled.wrappedBuffer(new byte[8])));
        ByteBuf buffer = ch.readOutbound();
        try {
            ch.writeInbound(buffer);
            fail();
        } catch (CorruptedWebSocketFrameException expected) {
            // expected
        }
        ReferenceCounted closeMessage = ch.readOutbound();
        assertInstanceOf(ByteBuf.class, closeMessage);
        closeMessage.release();
        assertFalse(ch.finish());
    }

Domain

Subdomains

Frequently Asked Questions

What does testCloseReason0() do?
testCloseReason0() is a function in the netty codebase, defined in codec-http/src/test/java/io/netty/handler/codec/http/websocketx/WebSocketServerHandshaker13Test.java.
Where is testCloseReason0() defined?
testCloseReason0() is defined in codec-http/src/test/java/io/netty/handler/codec/http/websocketx/WebSocketServerHandshaker13Test.java at line 174.
What does testCloseReason0() call?
testCloseReason0() calls 1 function(s): testUpgrade0.
What calls testCloseReason0()?
testCloseReason0() is called by 2 function(s): testCloseReasonWithCodec, testCloseReasonWithEncoderAndDecoder.

Analyze Your Own Codebase

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

Try Supermodel Free