testExplicitCloseFrameSentWhenServerChannelClosed() — netty Function Reference
Architecture documentation for the testExplicitCloseFrameSentWhenServerChannelClosed() function in WebSocketServerProtocolHandlerTest.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 5cddc236_d745_709f_a942_090f374243d5["testExplicitCloseFrameSentWhenServerChannelClosed()"] 7afc952d_7109_096b_f81d_bf3293e37581["WebSocketServerProtocolHandlerTest"] 5cddc236_d745_709f_a942_090f374243d5 -->|defined in| 7afc952d_7109_096b_f81d_bf3293e37581 style 5cddc236_d745_709f_a942_090f374243d5 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
codec-http/src/test/java/io/netty/handler/codec/http/websocketx/WebSocketServerProtocolHandlerTest.java lines 301–326
@Test
public void testExplicitCloseFrameSentWhenServerChannelClosed() throws Exception {
WebSocketCloseStatus closeStatus = WebSocketCloseStatus.ENDPOINT_UNAVAILABLE;
EmbeddedChannel client = createClient();
EmbeddedChannel server = createServer();
assertFalse(server.writeInbound(client.<ByteBuf>readOutbound()));
assertFalse(client.writeInbound(server.<ByteBuf>readOutbound()));
// When server channel closed with explicit close-frame
assertTrue(server.writeOutbound(new CloseWebSocketFrame(closeStatus)));
server.close();
// Then client receives provided close-frame
assertTrue(client.writeInbound(server.<ByteBuf>readOutbound()));
assertFalse(server.isOpen());
CloseWebSocketFrame closeMessage = client.readInbound();
assertEquals(closeMessage.statusCode(), closeStatus.code());
closeMessage.release();
client.close();
assertTrue(ReferenceCountUtil.release(client.readOutbound()));
assertFalse(client.finishAndReleaseAll());
assertFalse(server.finishAndReleaseAll());
}
Domain
Subdomains
Source
Frequently Asked Questions
What does testExplicitCloseFrameSentWhenServerChannelClosed() do?
testExplicitCloseFrameSentWhenServerChannelClosed() is a function in the netty codebase, defined in codec-http/src/test/java/io/netty/handler/codec/http/websocketx/WebSocketServerProtocolHandlerTest.java.
Where is testExplicitCloseFrameSentWhenServerChannelClosed() defined?
testExplicitCloseFrameSentWhenServerChannelClosed() is defined in codec-http/src/test/java/io/netty/handler/codec/http/websocketx/WebSocketServerProtocolHandlerTest.java at line 301.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free