Documentation ¶
Index ¶
- Variables
- type RxBuffer
- func (l *RxBuffer) CloseWithErr(err error)
- func (l *RxBuffer) IncWindow(d int32) RxStatus
- func (l *RxBuffer) Read(p []byte) (stat RxStatus, n int, err error)
- func (l *RxBuffer) ReadChunk(r io.Reader, limit int) (stat RxStatus, n int, err error)
- func (l *RxBuffer) SetMaxWindow(d int32) RxStatus
- func (l *RxBuffer) Status() RxStatus
- func (l *RxBuffer) WriteChunk(w io.Writer) (stat RxStatus, n int, err error)
- type RxStatus
- type TxCtrl
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNegativeWindowUpdate = errors.New("invalid window update, negative value") ErrFlowWindowIncOverflow = errors.New("invalid inc, flow control window overflow") ErrFlowControlUnderflow = errors.New("invalid data, flow control window underflow") )
View Source
var (
ErrClosedBuffer = errors.New("buffer was closed")
)
Functions ¶
This section is empty.
Types ¶
type RxBuffer ¶
type RxBuffer struct {
// contains filtered or unexported fields
}
func NewRxBuffer ¶
func (*RxBuffer) CloseWithErr ¶
Close this buffer. Unblock any blocked ops. The [err] will pass to all blocked called. If [err] is nil, the default error is io.EOF
func (*RxBuffer) ReadChunk ¶
Call r.Read() with inner buffer chunk. If limit > 0, then the read buffer will not larger than the limit.
func (*RxBuffer) SetMaxWindow ¶
type TxCtrl ¶
type TxCtrl struct {
// contains filtered or unexported fields
}
func (*TxCtrl) CloseWithErr ¶
If err == nil, the close err will be io.EOF.
func (*TxCtrl) ConsumeWindow ¶
ConsumeWindow tries to consume n bytes window. It will consume less than n window size if the available size is small than n. It blocks if window size is zero. If c was closed, it returns with an error. Concurrent safe.
Click to show internal directories.
Click to hide internal directories.