Top Description Methods
io.netty5.handler.codec.http2

public Interface Http2DataWriter

Known Direct Subinterfaces
io.netty5.handler.codec.http2.Http2FrameWriter
Annotations
@UnstableApi
Imports
io.netty5.buffer.Buffer, io.netty5.channel.ChannelHandlerContext, io.netty5.util.concurrent.Future, io.netty5.util.internal.UnstableApi

Interface that defines an object capable of producing HTTP/2 data frames.

Method Summary

Modifier and TypeMethod and Description
public Future<Void>

Returns:

the future for the write.
writeData
(ChannelHandlerContext
the context to use for writing.
ctx
,
int
the stream for which to send the frame.
streamId
,
Buffer
the payload of the frame. This will be released by this method.
data
,
int
additional bytes that should be added to obscure the true content size. Must be between 0 and 256 (inclusive). A 1 byte padding is encoded as just the pad length field with value 0. A 256 byte padding is encoded as the pad length field with value 255 and 255 padding bytes appended to the end of the frame.
padding
,
boolean
indicates if this is the last frame to be sent for the stream.
endStream
)

Writes a DATA frame to the remote endpoint.

Method Detail

writeDataback to summary
public Future<Void> writeData(ChannelHandlerContext ctx, int streamId, Buffer data, int padding, boolean endStream)

Writes a DATA frame to the remote endpoint. This will result in one or more frames being written to the context.

Parameters
ctx:ChannelHandlerContext

the context to use for writing.

streamId:int

the stream for which to send the frame.

data:Buffer

the payload of the frame. This will be released by this method.

padding:int

additional bytes that should be added to obscure the true content size. Must be between 0 and 256 (inclusive). A 1 byte padding is encoded as just the pad length field with value 0. A 256 byte padding is encoded as the pad length field with value 255 and 255 padding bytes appended to the end of the frame.

endStream:boolean

indicates if this is the last frame to be sent for the stream.

Returns:Future<Void>

the future for the write.