private void tryExpandConnectionFlowControlWindow(Http2Connection connection) throws Http2Exception { if (initialFlowControlWindowSize != null) { // The window size in the settings explicitly excludes the connection window. So we manually manipulate the // connection window to accommodate more concurrent data per connection. Http2Stream connectionStream = connection.connectionStream(); Http2LocalFlowController localFlowController = connection.local().flowController(); final int delta = initialFlowControlWindowSize - localFlowController.initialWindowSize(connectionStream); // Only increase the connection window, don't decrease it. if (delta > 0) { // Double the delta just so a single stream can't exhaust the connection window. localFlowController.incrementWindowSize(connectionStream, Math.max(delta << 1, delta)); flush(ctx); } } }
private void tryExpandConnectionFlowControlWindow(Http2Connection connection) throws Http2Exception { if (initialFlowControlWindowSize != null) { // The window size in the settings explicitly excludes the connection window. So we manually manipulate the // connection window to accommodate more concurrent data per connection. Http2Stream connectionStream = connection.connectionStream(); Http2LocalFlowController localFlowController = connection.local().flowController(); final int delta = initialFlowControlWindowSize - localFlowController.initialWindowSize(connectionStream); // Only increase the connection window, don't decrease it. if (delta > 0) { // Double the delta just so a single stream can't exhaust the connection window. localFlowController.incrementWindowSize(connectionStream, Math.max(delta << 1, delta)); flush(ctx); } } }
private void tryExpandConnectionFlowControlWindow(Http2Connection connection) throws Http2Exception { if (initialFlowControlWindowSize != null) { // The window size in the settings explicitly excludes the connection window. So we manually manipulate the // connection window to accommodate more concurrent data per connection. Http2Stream connectionStream = connection.connectionStream(); Http2LocalFlowController localFlowController = connection.local().flowController(); final int delta = initialFlowControlWindowSize - localFlowController.initialWindowSize(connectionStream); // Only increase the connection window, don't decrease it. if (delta > 0) { // Double the delta just so a single stream can't exhaust the connection window. localFlowController.incrementWindowSize(connectionStream, Math.max(delta << 1, delta)); flush(ctx); } } }
private void tryExpandConnectionFlowControlWindow(Http2Connection connection) throws Http2Exception { if (initialFlowControlWindowSize != null) { // The window size in the settings explicitly excludes the connection window. So we manually manipulate the // connection window to accommodate more concurrent data per connection. Http2Stream connectionStream = connection.connectionStream(); Http2LocalFlowController localFlowController = connection.local().flowController(); final int delta = initialFlowControlWindowSize - localFlowController.initialWindowSize(connectionStream); // Only increase the connection window, don't decrease it. if (delta > 0) { // Double the delta just so a single stream can't exhaust the connection window. localFlowController.incrementWindowSize(connectionStream, Math.max(delta << 1, delta)); flush(ctx); } } }
private void tryExpandConnectionFlowControlWindow(Http2Connection connection) throws Http2Exception { if (initialFlowControlWindowSize != null) { // The window size in the settings explicitly excludes the connection window. So we manually manipulate the // connection window to accommodate more concurrent data per connection. Http2Stream connectionStream = connection.connectionStream(); Http2LocalFlowController localFlowController = connection.local().flowController(); final int delta = initialFlowControlWindowSize - localFlowController.initialWindowSize(connectionStream); // Only increase the connection window, don't decrease it. if (delta > 0) { // Double the delta just so a single stream can't exhaust the connection window. localFlowController.incrementWindowSize(connectionStream, Math.max(delta << 1, delta)); flush(ctx); } } }
private void tryExpandConnectionFlowControlWindow(Http2Connection connection) throws Http2Exception { if (initialFlowControlWindowSize != null) { // The window size in the settings explicitly excludes the connection window. So we manually manipulate the // connection window to accommodate more concurrent data per connection. Http2Stream connectionStream = connection.connectionStream(); Http2LocalFlowController localFlowController = connection.local().flowController(); final int delta = initialFlowControlWindowSize - localFlowController.initialWindowSize(connectionStream); // Only increase the connection window, don't decrease it. if (delta > 0) { // Double the delta just so a single stream can't exhaust the connection window. localFlowController.incrementWindowSize(connectionStream, Math.max(delta << 1, delta)); flush(ctx); } } }