public static interface StreamByteDistributor.StreamState
StreamByteDistributor.updateStreamableBytes(StreamState)
方法。
Modifier and Type | Method and Description |
---|---|
boolean |
hasFrame()
指示是否存在等待此流的帧。
|
long |
pendingBytes()
获取此流有待发送的字节量。
|
Http2Stream |
stream()
获取这个状态关联的流。
|
int |
windowSize()
流的流量控制窗口的大小(以字节为单位)。
|
Http2Stream stream()
long pendingBytes()
windowSize()
!
Http2CodecUtil#streamableBytes(StreamState)
boolean hasFrame()
int windowSize()
StreamByteDistributor
需要知道流的窗口大小,以避免在窗口大小为负时分配字节。 窗口大小为0
对于确定一个流是否有机会编写一个空帧也是很重要的,并且还可以实现优化,比如在某些情况下不写空帧(不写头,直到数据也可以被写入)。
Http2CodecUtil#streamableBytes(StreamState)
Copyright © 2008–2018 The Netty Project. All rights reserved.