Home / Function/ testAggregationBinary() — netty Function Reference

testAggregationBinary() — netty Function Reference

Architecture documentation for the testAggregationBinary() function in WebSocketFrameAggregatorTest.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  b7764254_fa18_8965_3b32_9b8b5095eec5["testAggregationBinary()"]
  9b5f26dc_7e92_130b_ab49_c6ef440312f1["WebSocketFrameAggregatorTest"]
  b7764254_fa18_8965_3b32_9b8b5095eec5 -->|defined in| 9b5f26dc_7e92_130b_ab49_c6ef440312f1
  9aa64dd6_6e63_3fd7_0944_7e6183dc48f2["toBytes()"]
  b7764254_fa18_8965_3b32_9b8b5095eec5 -->|calls| 9aa64dd6_6e63_3fd7_0944_7e6183dc48f2
  style b7764254_fa18_8965_3b32_9b8b5095eec5 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

codec-http/src/test/java/io/netty/handler/codec/http/websocketx/WebSocketFrameAggregatorTest.java lines 44–77

    @Test
    public void testAggregationBinary() {
        EmbeddedChannel channel = new EmbeddedChannel(new WebSocketFrameAggregator(Integer.MAX_VALUE));
        channel.writeInbound(new BinaryWebSocketFrame(true, 1, Unpooled.wrappedBuffer(content1)));
        channel.writeInbound(new BinaryWebSocketFrame(false, 0, Unpooled.wrappedBuffer(content1)));
        channel.writeInbound(new ContinuationWebSocketFrame(false, 0, Unpooled.wrappedBuffer(content2)));
        channel.writeInbound(new PingWebSocketFrame(Unpooled.wrappedBuffer(content1)));
        channel.writeInbound(new PongWebSocketFrame(Unpooled.wrappedBuffer(content1)));
        channel.writeInbound(new ContinuationWebSocketFrame(true, 0, Unpooled.wrappedBuffer(content3)));

        assertTrue(channel.finish());

        BinaryWebSocketFrame frame = channel.readInbound();
        assertTrue(frame.isFinalFragment());
        assertEquals(1, frame.rsv());
        assertArrayEquals(content1, toBytes(frame.content()));

        PingWebSocketFrame frame2 = channel.readInbound();
        assertTrue(frame2.isFinalFragment());
        assertEquals(0, frame2.rsv());
        assertArrayEquals(content1, toBytes(frame2.content()));

        PongWebSocketFrame frame3 = channel.readInbound();
        assertTrue(frame3.isFinalFragment());
        assertEquals(0, frame3.rsv());
        assertArrayEquals(content1, toBytes(frame3.content()));

        BinaryWebSocketFrame frame4 = channel.readInbound();
        assertTrue(frame4.isFinalFragment());
        assertEquals(0, frame4.rsv());
        assertArrayEquals(aggregatedContent, toBytes(frame4.content()));

        assertNull(channel.readInbound());
    }

Domain

Subdomains

Calls

Frequently Asked Questions

What does testAggregationBinary() do?
testAggregationBinary() is a function in the netty codebase, defined in codec-http/src/test/java/io/netty/handler/codec/http/websocketx/WebSocketFrameAggregatorTest.java.
Where is testAggregationBinary() defined?
testAggregationBinary() is defined in codec-http/src/test/java/io/netty/handler/codec/http/websocketx/WebSocketFrameAggregatorTest.java at line 44.
What does testAggregationBinary() call?
testAggregationBinary() calls 1 function(s): toBytes.

Analyze Your Own Codebase

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

Try Supermodel Free