Lines Matching defs:buffer
26 type buffer struct { struct
27 buf []byte // buf is a byte buffer who's length and capacity are equal.
28 nc net.Conn
29 idx int
30 length int
31 timeout time.Duration
32 dbuf [2][]byte // dbuf is an array with the two byte slices that back this buffer
33 flipcnt uint // flipccnt is the current buffer counter for double-buffering
49 func (b *buffer) flip() {
54 func (b *buffer) fill(need int) error {
116 func (b *buffer) readNext(need int) ([]byte, error) {
134 func (b *buffer) takeBuffer(length int) ([]byte, error) {
156 func (b *buffer) takeSmallBuffer(length int) ([]byte, error) {
167 func (b *buffer) takeCompleteBuffer() ([]byte, error) {
175 func (b *buffer) store(buf []byte) error {