Home / Function/ testCloseFrameSentWhenClientChannelClosedSilently() — netty Function Reference

testCloseFrameSentWhenClientChannelClosedSilently() — netty Function Reference

Architecture documentation for the testCloseFrameSentWhenClientChannelClosedSilently() function in WebSocketServerProtocolHandlerTest.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  3ba1a586_3823_a5a5_9dce_334a1b6b4648["testCloseFrameSentWhenClientChannelClosedSilently()"]
  7afc952d_7109_096b_f81d_bf3293e37581["WebSocketServerProtocolHandlerTest"]
  3ba1a586_3823_a5a5_9dce_334a1b6b4648 -->|defined in| 7afc952d_7109_096b_f81d_bf3293e37581
  style 3ba1a586_3823_a5a5_9dce_334a1b6b4648 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

codec-http/src/test/java/io/netty/handler/codec/http/websocketx/WebSocketServerProtocolHandlerTest.java lines 379–401

    @Test
    public void testCloseFrameSentWhenClientChannelClosedSilently() throws Exception {
        EmbeddedChannel client = createClient();
        EmbeddedChannel server = createServer();

        assertFalse(server.writeInbound(client.<ByteBuf>readOutbound()));
        assertFalse(client.writeInbound(server.<ByteBuf>readOutbound()));

        // When client channel closed without explicit close-frame
        client.close();

        // Then server receives NORMAL_CLOSURE close-frame
        assertFalse(server.writeInbound(client.<ByteBuf>readOutbound()));
        assertFalse(client.isOpen());
        assertFalse(server.isOpen());

        CloseWebSocketFrame closeMessage = decode(server.<ByteBuf>readOutbound(), CloseWebSocketFrame.class);
        assertEquals(closeMessage, new CloseWebSocketFrame(WebSocketCloseStatus.NORMAL_CLOSURE));
        closeMessage.release();

        assertFalse(client.finishAndReleaseAll());
        assertFalse(server.finishAndReleaseAll());
    }

Domain

Subdomains

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free