/** * Called to perform a window update for this stream (or connection). Updates the window size * back to the size of the initial window and sends a window update frame to the remote * endpoint. */ void updateWindow(FrameWriter frameWriter) throws Http2Exception { // Expand the window for this stream back to the size of the initial window. int deltaWindowSize = initialWindowSize - windowSize(); addAndGet(deltaWindowSize); // Send a window update for the stream/connection. frameWriter.writeFrame(streamId, deltaWindowSize); }
/** * Called to perform a window update for this stream (or connection). Updates the window size * back to the size of the initial window and sends a window update frame to the remote * endpoint. */ public void updateWindow(FrameWriter frameWriter) throws Http2Exception { // Expand the window for this stream back to the size of the initial window. int deltaWindowSize = initialWindowSize - getSize(); addAndGet(deltaWindowSize); // Send a window update for the stream/connection. Http2WindowUpdateFrame updateFrame = new DefaultHttp2WindowUpdateFrame.Builder() .setStreamId(streamId) .setWindowSizeIncrement(deltaWindowSize) .build(); frameWriter.writeFrame(updateFrame); }