Documentation ¶
Index ¶
- Constants
- Variables
- func EncodeHexString(src []byte) string
- func Get(size int) []byte
- func LenMulti(buffers []*Buffer) int
- func Make(size int) []byte
- 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) Closed() bool
- func (b *Buffer) Cut(start int, end int) *Buffer
- 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()
- func (b *Buffer) IncRef()
- func (b *Buffer) Index(start int) []byte
- func (b *Buffer) IsEmpty() bool
- func (b *Buffer) IsFull() bool
- func (b *Buffer) Len() int
- func (b *Buffer) Range(start, end int) []byte
- 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) (int64, error)
- func (b *Buffer) ReadPacketFrom(r net.PacketConn) (int64, net.Addr, error)
- func (b *Buffer) Release()
- func (b *Buffer) Reset()
- func (b *Buffer) Resize(start, end int)
- func (b *Buffer) SetByte(index int, value byte)
- func (b *Buffer) Slice() []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) (int, 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 ( ReversedHeader = 1024 BufferSize = 32 * 1024 UDPBufferSize = 16 * 1024 )
Variables ¶
View Source
var DefaultAllocator = newDefaultAllocer()
Functions ¶
func EncodeHexString ¶
func ReleaseMulti ¶
func ReleaseMulti(buffers []*Buffer)
func ToSliceMulti ¶
Types ¶
type Buffer ¶
type Buffer struct {
// contains filtered or unexported fields
}
func StackNewPacket ¶
func StackNewPacket() *Buffer
func StackNewSize ¶
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.