|Modifier and Type||Method and Description|
Indicates that the application has consumed a number of bytes for the given stream and is therefore ready to receive more data from the remote endpoint.
Receives an inbound
The number of bytes for the given stream that have been received but not yet consumed by the application.
void receiveFlowControlledFrame(ChannelHandlerContext ctx, Http2Stream stream, ByteBuf data, int padding, boolean endOfStream) throws Http2Exception
DATAframe from the remote endpoint and applies flow control policies to it for both the
streamas well as the connection. If any flow control policies have been violated, an exception is raised immediately, otherwise the frame is considered to have "passed" flow control.
ctx- the context from the handler where the frame was read.
stream- the subject stream for the received frame. The connection stream object must not be used.
data- payload buffer for the frame.
padding- the number of padding bytes found at the end of the frame.
endOfStream- Indicates whether this is the last frame to be sent from the remote endpoint for this stream.
Http2Exception- if any flow control errors are encountered.
void consumeBytes(ChannelHandlerContext ctx, Http2Stream stream, int numBytes) throws Http2Exception
WINDOW_UPDATEto restore a portion of the flow control window for the stream.
ctx- the channel handler context to use when sending a
stream- the stream for which window space should be freed. The connection stream object must not be used.
numBytes- the number of bytes to be returned to the flow control window.
Http2Exception- if the number of bytes returned exceeds the
unconsumedBytes(io.netty.handler.codec.http2.Http2Stream)for the stream.
int unconsumedBytes(Http2Stream stream)
stream- the stream for which window space should be freed.
Copyright © 2008–2015 The Netty Project. All rights reserved.