Home / Function/ writeFrameHasPayload() — netty Function Reference

writeFrameHasPayload() — netty Function Reference

Architecture documentation for the writeFrameHasPayload() function in DefaultHttp2FrameWriterTest.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  9f64f681_d8f9_4c6a_a883_3fbae083f914["writeFrameHasPayload()"]
  602c48d7_d78b_d8f3_745e_26d2ab6ce0f2["DefaultHttp2FrameWriterTest"]
  9f64f681_d8f9_4c6a_a883_3fbae083f914 -->|defined in| 602c48d7_d78b_d8f3_745e_26d2ab6ce0f2
  style 9f64f681_d8f9_4c6a_a883_3fbae083f914 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

codec-http2/src/test/java/io/netty/handler/codec/http2/DefaultHttp2FrameWriterTest.java lines 312–328

    @Test
    public void writeFrameHasPayload() throws Exception {
        byte[] payload = {(byte) 0x01, (byte) 0x03, (byte) 0x05, (byte) 0x07, (byte) 0x09};

        // will auto release after frameWriter.writeFrame succeed
        ByteBuf payloadByteBuf = Unpooled.wrappedBuffer(payload);
        frameWriter.writeFrame(ctx, (byte) 0xf, 0, new Http2Flags(), payloadByteBuf, promise);

        byte[] expectedFrameHeaderBytes = {
                (byte) 0x00, (byte) 0x00, (byte) 0x05, // payload length
                (byte) 0x0f, // payload type
                (byte) 0x00, // flags
                (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00 // stream id
        };
        expectedOutbound = Unpooled.copiedBuffer(expectedFrameHeaderBytes, payload);
        assertEquals(expectedOutbound, outbound);
    }

Domain

Subdomains

Frequently Asked Questions

What does writeFrameHasPayload() do?
writeFrameHasPayload() is a function in the netty codebase, defined in codec-http2/src/test/java/io/netty/handler/codec/http2/DefaultHttp2FrameWriterTest.java.
Where is writeFrameHasPayload() defined?
writeFrameHasPayload() is defined in codec-http2/src/test/java/io/netty/handler/codec/http2/DefaultHttp2FrameWriterTest.java at line 312.

Analyze Your Own Codebase

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

Try Supermodel Free