Documentation ¶
Index ¶
- Constants
- Variables
- func CopyMulti(toBuffer []byte, buffers []*Buffer) int
- func Get(size int) []byte
- func LenMulti(buffers []*Buffer) int
- func Make(size int) []bytedeprecated
- func Put(buf []byte) error
- func ReleaseMulti(buffers []*Buffer)
- func ToSliceMulti(buffers []*Buffer) [][]byte
- type Allocator
- type Buffer
- func (b *Buffer) Advance(from int)
- func (b *Buffer) Byte(index int) byte
- func (b *Buffer) Bytes() []byte
- func (b *Buffer) Cap() int
- func (b *Buffer) DecRef()
- func (b *Buffer) Extend(n int) []byte
- func (b *Buffer) ExtendHeader(n int) []byte
- func (b *Buffer) FreeBytes() []byte
- func (b *Buffer) FreeLen() int
- func (b *Buffer) From(n int) []byte
- func (b *Buffer) FullReset()deprecated
- func (b *Buffer) IncRef()
- func (b *Buffer) Index(start int) []byte
- func (b *Buffer) IsEmpty() bool
- func (b *Buffer) IsFull() bool
- func (b *Buffer) Leak()
- func (b *Buffer) Len() int
- func (b *Buffer) OverCap(n int)
- func (b *Buffer) Range(start, end int) []byte
- func (b *Buffer) RawCap() int
- func (b *Buffer) Read(data []byte) (n int, err error)
- func (b *Buffer) ReadAtLeastFrom(r io.Reader, min int) (int64, error)
- func (b *Buffer) ReadByte() (byte, error)
- func (b *Buffer) ReadBytes(n int) ([]byte, error)
- func (b *Buffer) ReadFrom(reader io.Reader) (n int64, err error)
- func (b *Buffer) ReadFullFrom(r io.Reader, size int) (n int, err error)
- func (b *Buffer) ReadOnceFrom(r io.Reader) (int, error)
- func (b *Buffer) ReadPacketFrom(r net.PacketConn) (int64, net.Addr, error)
- func (b *Buffer) Release()
- func (b *Buffer) Reserve(n int)
- func (b *Buffer) Reset()
- func (b *Buffer) Resize(start, end int)
- func (b *Buffer) SetByte(index int, value byte)
- func (b *Buffer) Start() int
- func (b *Buffer) To(n int) []byte
- func (b *Buffer) ToOwned() *Buffer
- func (b *Buffer) Truncate(to int)
- func (b *Buffer) Write(data []byte) (n int, err error)
- func (b *Buffer) WriteByte(d byte) error
- func (b *Buffer) WriteRandom(size int) []byte
- func (b *Buffer) WriteRune(s rune) (int, error)
- func (b *Buffer) WriteString(s string) (n int, err error)
- func (b *Buffer) WriteTo(w io.Writer) (int64, error)
- func (b *Buffer) WriteZero() error
- func (b *Buffer) WriteZeroN(n int) error
Constants ¶
View Source
const ( BufferSize = 32 * 1024 UDPBufferSize = 16 * 1024 )
Variables ¶
View Source
var DefaultAllocator = newDefaultAllocator()
Functions ¶
func ReleaseMulti ¶
func ReleaseMulti(buffers []*Buffer)
func ToSliceMulti ¶
Types ¶
type Buffer ¶
type Buffer struct {
// contains filtered or unexported fields
}
func (*Buffer) ExtendHeader ¶
func (*Buffer) ReadAtLeastFrom ¶
func (*Buffer) ReadFullFrom ¶
func (*Buffer) ReadPacketFrom ¶
func (*Buffer) WriteRandom ¶
func (*Buffer) WriteZeroN ¶
Click to show internal directories.
Click to hide internal directories.