Documentation
¶
Index ¶
Constants ¶
const DEFAULT_WINDOW_SIZE uint32 = 64 * 1024
When a SPDY connection is first established, the default initial window size for all streams is 64KB.
Variables ¶
var ErrWindowOverflow = errors.New("Window overflow")
Functions ¶
This section is empty.
Types ¶
type BlockingPriorityQueue ¶
type BlockingPriorityQueue struct {
// contains filtered or unexported fields
}
func NewBlockingPriorityQueue ¶
func NewBlockingPriorityQueue(size uint32) *BlockingPriorityQueue
func (*BlockingPriorityQueue) Pop ¶
func (bq *BlockingPriorityQueue) Pop() PriorityItem
func (*BlockingPriorityQueue) Push ¶
func (bq *BlockingPriorityQueue) Push(item PriorityItem)
type FlowCtrlWin ¶
FlowCtrlWin is the implementation of SPDY Flow Control Window for sending.
func NewFlowCtrlInitSize ¶
func NewFlowCtrlInitSize(initSize uint32) (*FlowCtrlWin, error)
NewFlowCtrlInitSize creates a new flow control window for sending. This method returns framing.ErrInvalidDeltaWindowSize if the delta size is invalid
func NewFlowCtrlWin ¶
func NewFlowCtrlWin() *FlowCtrlWin
NewFlowCtrlWin calls NewCtrlFlowWinInitSize(DEFAULT_WINDOW_SIZE)
func (*FlowCtrlWin) InitSize ¶
func (w *FlowCtrlWin) InitSize(initSize uint32) error
InitSize chances the window size. Should be called when receiving a SETTINGS frame with ID SETTINGS_INITIAL_WINDOW_SIZE. This method returns framing.ErrInvalidDeltaWindowSize if the delta size is invalid.
func (*FlowCtrlWin) Return ¶
func (w *FlowCtrlWin) Return(delta uint32) error
Return returns some amount of window. L must be locked before call this method. When a WINDOW_UPDATE frame is received, lock L first, then call this method with the delta widnow size, and unlock L when done. This method returns framing.ErrInvalidDeltaWindowSize if the delta size is invalid, and returns ErrWindowDeltaOverflow if plusing this delta causes window over flow.
func (*FlowCtrlWin) Use ¶
func (w *FlowCtrlWin) Use(delta uint32)
Use takes up some amount of window. L must be locked before call this method. When sending data, lock L first, then call this method and send that amount of data, and unlock L when done.
type PriorityItem ¶
type PriorityItem interface { // Whether this item take precedence over the other item. TakePrecedenceOver(other PriorityItem) bool }