コード例 #1
0
    @Override
    public void complete() {
      bufferPool.release(buffer);

      super.complete();

      if (frame.getType() == ControlFrameType.GO_AWAY) {
        // After sending a GO_AWAY we need to hard close the connection.
        // Recipients will know the last good stream id and act accordingly.
        close();
      }
      IStream stream = getStream();
      if (stream != null && stream.isClosed()) removeStream(stream);
    }
コード例 #2
0
 @Override
 public void complete() {
   bufferPool.release(buffer);
   IStream stream = getStream();
   dataInfo.consume(size);
   flowControlStrategy.updateWindow(StandardSession.this, stream, -size);
   if (dataInfo.available() > 0) {
     // We have written a frame out of this DataInfo, but there is more to write.
     // We need to keep the correct ordering of frames, to avoid that another
     // DataInfo for the same stream is written before this one is finished.
     prepend(this);
     flush();
   } else {
     super.complete();
     stream.updateCloseState(dataInfo.isClose(), true);
     if (stream.isClosed()) removeStream(stream);
   }
 }
コード例 #3
0
 @Override
 public void complete() {
   super.complete();
   close();
 }