code: int windowUpdate(@Nullable OkHttpClientStream stream, int delta) {
      final int updatedWindow;
      if (stream == null) {
        // Update the connection window and write any pending frames for all streams.
        updatedWindow = connectionState.incrementStreamWindow(delta);
        writeStreams();
      } else {
        // Update the stream window and write any pending frames for the stream.
        OutboundFlowState state = state(stream);
        updatedWindow = state.incrementStreamWindow(delta);
  
        WriteStatus writeStatus = new WriteStatus();
        state.writeBytes(state.writableWindow(), writeStatus);
        if (writeStatus.hasWritten()) {
          flush();
        }
      }
      return updatedWindow;
    }
docs: Update the outbound window for given stream, or for the connection if stream is null. Returns
  the new value of the window size.
  
  <p>Must be called with holding transport lock.