Documentation ¶
Index ¶
- Constants
- func GetBuffer() *bytes.Buffer
- func GetNetBuf() *[]byte
- func PutBuffer(buf *bytes.Buffer)
- func PutBufferWriter(buf *BufferWriter)
- func PutNetBuf(bufP *[]byte)
- type Buffer
- func (b *Buffer) Bytes() []byte
- func (b *Buffer) Cap() int
- func (b *Buffer) Grow(n int)
- func (b *Buffer) Len() int
- func (b *Buffer) Next(n int) []byte
- func (b *Buffer) Read(p []byte) (n int, err error)
- func (b *Buffer) ReadByte() (byte, error)
- func (b *Buffer) ReadFrom(r io.Reader) (n int64, err error)
- func (b *Buffer) ReadFullFrom(r io.Reader, size int64) (n int64, err error)
- func (b *Buffer) ReadUint16(r io.Reader) (uint16, error)
- func (b *Buffer) ReadUint16be(r io.Reader) (uint16, error)
- func (b *Buffer) ReadUint32(r io.Reader) (uint32, error)
- func (b *Buffer) ReadUint32be(r io.Reader) (uint32, error)
- func (b *Buffer) ReadUint64(r io.Reader) (uint64, error)
- func (b *Buffer) ReadUint64be(r io.Reader) (uint64, error)
- func (b *Buffer) ReadUint8(r io.Reader) (uint8, error)
- func (b *Buffer) Release()
- func (b *Buffer) Reset()
- func (b *Buffer) Write(p []byte) (n int, err error)
- func (b *Buffer) WriteTo(w io.Writer) (n int64, err error)
- type BufferReader
- func (br *BufferReader) Cap() int
- func (br *BufferReader) IsEmpty() bool
- func (br *BufferReader) Len() int
- func (br *BufferReader) Read(p []byte) (n int, err error)
- func (br *BufferReader) ReadByte() (byte, error)
- func (br *BufferReader) ReadIPv4() netip.Addr
- func (br *BufferReader) ReadIPv6() netip.Addr
- func (br *BufferReader) ReadUint16() uint16
- func (br *BufferReader) ReadUint16be() uint16
- func (br *BufferReader) ReadUint32() uint32
- func (br *BufferReader) ReadUint32be() uint32
- func (br *BufferReader) ReadUint64() uint64
- func (br *BufferReader) ReadUint64be() uint64
- func (br *BufferReader) ReadUint8() uint8
- func (br *BufferReader) ReadUvarint() (uint64, error)
- func (br *BufferReader) ReadVarint() (int64, error)
- func (br *BufferReader) Skip(n int)
- func (br *BufferReader) SplitAt(n int) (BufferReader, BufferReader)
- func (br *BufferReader) SplitBy(f func(byte) bool) (BufferReader, BufferReader)
- type BufferWriter
- func (bw *BufferWriter) Bytes() []byte
- func (bw *BufferWriter) Cap() int
- func (bw *BufferWriter) Grow(n int) int
- func (bw *BufferWriter) Len() int
- func (bw *BufferWriter) PutIPv4(ip net.IP)
- func (bw *BufferWriter) PutIPv6(ip net.IP)
- func (bw *BufferWriter) PutNetIPv4(addr netip.Addr)
- func (bw *BufferWriter) PutNetIPv6(addr netip.Addr)
- func (bw *BufferWriter) PutRune(r rune)
- func (bw *BufferWriter) PutSlice(p []byte)
- func (bw *BufferWriter) PutString(s string)
- func (bw *BufferWriter) PutUint16(v uint16)
- func (bw *BufferWriter) PutUint16be(v uint16)
- func (bw *BufferWriter) PutUint32(v uint32)
- func (bw *BufferWriter) PutUint32be(v uint32)
- func (bw *BufferWriter) PutUint64(v uint64)
- func (bw *BufferWriter) PutUint64be(v uint64)
- func (bw *BufferWriter) PutUint8(v uint8)
- func (bw *BufferWriter) PutUvarint(v uint64)
- func (bw *BufferWriter) PutVarint(v int64)
- func (bw *BufferWriter) ReadFull(r io.Reader, n int) error
- func (bw *BufferWriter) Reset()
- func (bw *BufferWriter) Slice(begin, end int) BufferWriter
- func (bw *BufferWriter) String() string
- func (bw *BufferWriter) Truncate(n int) *BufferWriter
- func (bw *BufferWriter) Write(p []byte) (n int, err error)
- func (bw *BufferWriter) WriteTo(w io.Writer) (n int64, err error)
Constants ¶
View Source
const (
NetBufferSize = 64 << 10
)
Variables ¶
This section is empty.
Functions ¶
func PutBufferWriter ¶
func PutBufferWriter(buf *BufferWriter)
Types ¶
type Buffer ¶
type Buffer struct {
// contains filtered or unexported fields
}
func (*Buffer) ReadFullFrom ¶
type BufferReader ¶
type BufferReader []byte
func (*BufferReader) Cap ¶
func (br *BufferReader) Cap() int
func (*BufferReader) IsEmpty ¶
func (br *BufferReader) IsEmpty() bool
func (*BufferReader) Len ¶
func (br *BufferReader) Len() int
func (*BufferReader) ReadByte ¶
func (br *BufferReader) ReadByte() (byte, error)
func (*BufferReader) ReadIPv4 ¶
func (br *BufferReader) ReadIPv4() netip.Addr
func (*BufferReader) ReadIPv6 ¶
func (br *BufferReader) ReadIPv6() netip.Addr
func (*BufferReader) ReadUint16 ¶
func (br *BufferReader) ReadUint16() uint16
func (*BufferReader) ReadUint16be ¶
func (br *BufferReader) ReadUint16be() uint16
func (*BufferReader) ReadUint32 ¶
func (br *BufferReader) ReadUint32() uint32
func (*BufferReader) ReadUint32be ¶
func (br *BufferReader) ReadUint32be() uint32
func (*BufferReader) ReadUint64 ¶
func (br *BufferReader) ReadUint64() uint64
func (*BufferReader) ReadUint64be ¶
func (br *BufferReader) ReadUint64be() uint64
func (*BufferReader) ReadUint8 ¶
func (br *BufferReader) ReadUint8() uint8
func (*BufferReader) ReadUvarint ¶
func (br *BufferReader) ReadUvarint() (uint64, error)
func (*BufferReader) ReadVarint ¶
func (br *BufferReader) ReadVarint() (int64, error)
func (*BufferReader) Skip ¶
func (br *BufferReader) Skip(n int)
func (*BufferReader) SplitAt ¶
func (br *BufferReader) SplitAt(n int) (BufferReader, BufferReader)
func (*BufferReader) SplitBy ¶
func (br *BufferReader) SplitBy(f func(byte) bool) (BufferReader, BufferReader)
type BufferWriter ¶
type BufferWriter []byte
func GetBufferWriter ¶
func GetBufferWriter() *BufferWriter
func (*BufferWriter) Bytes ¶
func (bw *BufferWriter) Bytes() []byte
func (*BufferWriter) Cap ¶
func (bw *BufferWriter) Cap() int
func (*BufferWriter) Grow ¶
func (bw *BufferWriter) Grow(n int) int
func (*BufferWriter) Len ¶
func (bw *BufferWriter) Len() int
func (*BufferWriter) PutIPv4 ¶
func (bw *BufferWriter) PutIPv4(ip net.IP)
func (*BufferWriter) PutIPv6 ¶
func (bw *BufferWriter) PutIPv6(ip net.IP)
func (*BufferWriter) PutNetIPv4 ¶
func (bw *BufferWriter) PutNetIPv4(addr netip.Addr)
func (*BufferWriter) PutNetIPv6 ¶
func (bw *BufferWriter) PutNetIPv6(addr netip.Addr)
func (*BufferWriter) PutRune ¶
func (bw *BufferWriter) PutRune(r rune)
func (*BufferWriter) PutSlice ¶
func (bw *BufferWriter) PutSlice(p []byte)
func (*BufferWriter) PutString ¶
func (bw *BufferWriter) PutString(s string)
func (*BufferWriter) PutUint16 ¶
func (bw *BufferWriter) PutUint16(v uint16)
func (*BufferWriter) PutUint16be ¶
func (bw *BufferWriter) PutUint16be(v uint16)
func (*BufferWriter) PutUint32 ¶
func (bw *BufferWriter) PutUint32(v uint32)
func (*BufferWriter) PutUint32be ¶
func (bw *BufferWriter) PutUint32be(v uint32)
func (*BufferWriter) PutUint64 ¶
func (bw *BufferWriter) PutUint64(v uint64)
func (*BufferWriter) PutUint64be ¶
func (bw *BufferWriter) PutUint64be(v uint64)
func (*BufferWriter) PutUint8 ¶
func (bw *BufferWriter) PutUint8(v uint8)
func (*BufferWriter) PutUvarint ¶
func (bw *BufferWriter) PutUvarint(v uint64)
func (*BufferWriter) PutVarint ¶
func (bw *BufferWriter) PutVarint(v int64)
func (*BufferWriter) Reset ¶
func (bw *BufferWriter) Reset()
func (*BufferWriter) Slice ¶
func (bw *BufferWriter) Slice(begin, end int) BufferWriter
func (*BufferWriter) String ¶
func (bw *BufferWriter) String() string
func (*BufferWriter) Truncate ¶
func (bw *BufferWriter) Truncate(n int) *BufferWriter
Click to show internal directories.
Click to hide internal directories.