Documentation ¶
Index ¶
- Constants
- Variables
- func GetBuffer() *bytes.Buffer
- func GetBytes[T constraints.Integer](size T) []byte
- func PutBuffer(b *bytes.Buffer)
- func PutBytes(b []byte)
- type Buffer
- func (b *Buffer) Advance(i int)
- func (b *Buffer) Bytes() []byte
- func (b *Buffer) Discard(n int) []byte
- func (b *Buffer) Free()
- func (b *Buffer) Len() int
- func (b *Buffer) ReadFrom(c net.Conn) (int, error)
- func (b *Buffer) ReadFromPacket(pc net.PacketConn) (int, net.Addr, error)
- func (b *Buffer) String() string
- func (b *Buffer) Truncate(n int)
- func (b *Buffer) Unwrap() *Bytes
- func (b *Buffer) Write(bb []byte) (int, error)
- func (b *Buffer) WriteByte(v byte) error
- func (b *Buffer) WriteLittleEndianUint16(v uint16)
- func (b *Buffer) WriteLittleEndianUint32(v uint32)
- func (b *Buffer) WriteLittleEndianUint64(v uint64)
- func (b *Buffer) WriteString(s string)
- func (b *Buffer) WriteUint16(v uint16)
- func (b *Buffer) WriteUint32(v uint32)
- func (b *Buffer) WriteUint64(v uint64)
- type Bytes
- func (b *Bytes) After(index int) []byte
- func (b *Bytes) AsWriter() *Buffer
- func (b *Bytes) Bytes() []byte
- func (b *Bytes) Copy(byte []byte) *Bytes
- func (b *Bytes) Free()
- func (b *Bytes) Len() int
- func (b *Bytes) ReadFrom(c net.Conn) (int, error)
- func (b *Bytes) ReadFromPacket(pc net.PacketConn) (int, net.Addr, error)
- func (b *Bytes) Refactor(start, end int) *Bytes
- func (b *Bytes) String() string
- type MultipleBuffer
- type MultipleBytes
- type Pool
- type ReverseProxyBuffer
Constants ¶
View Source
const DefaultSize = 16 * 0x400
Variables ¶
View Source
var MaxSegmentSize = math.MaxUint16
Functions ¶
func GetBytes ¶
func GetBytes[T constraints.Integer](size T) []byte
Types ¶
type Buffer ¶ added in v0.3.5
type Buffer struct {
// contains filtered or unexported fields
}
func GetBytesWriter ¶ added in v0.3.5
func GetBytesWriter[T constraints.Integer](size T) *Buffer
func (*Buffer) ReadFromPacket ¶ added in v0.3.5
func (*Buffer) WriteLittleEndianUint16 ¶ added in v0.3.5
func (*Buffer) WriteLittleEndianUint32 ¶ added in v0.3.5
func (*Buffer) WriteLittleEndianUint64 ¶ added in v0.3.5
func (*Buffer) WriteString ¶ added in v0.3.5
func (*Buffer) WriteUint16 ¶ added in v0.3.5
func (*Buffer) WriteUint32 ¶ added in v0.3.5
func (*Buffer) WriteUint64 ¶ added in v0.3.5
type Bytes ¶
type Bytes struct {
// contains filtered or unexported fields
}
func GetBytesBuffer ¶ added in v0.3.3
func GetBytesBuffer[T constraints.Integer](size T) *Bytes
func NewBytesBuffer ¶ added in v0.3.3
func (*Bytes) ReadFromPacket ¶ added in v0.3.5
type MultipleBuffer ¶ added in v0.3.5
type MultipleBuffer []*Buffer
func (MultipleBuffer) Free ¶ added in v0.3.5
func (m MultipleBuffer) Free()
type MultipleBytes ¶ added in v0.3.3
type MultipleBytes []*Bytes
func (MultipleBytes) Free ¶ added in v0.3.5
func (m MultipleBytes) Free()
type Pool ¶
type Pool interface { GetBytes(size int) []byte PutBytes(b []byte) GetBuffer() *bytes.Buffer PutBuffer(b *bytes.Buffer) }
var DefaultPool Pool = &pool{}
type ReverseProxyBuffer ¶
type ReverseProxyBuffer struct{}
func (ReverseProxyBuffer) Get ¶
func (ReverseProxyBuffer) Get() []byte
func (ReverseProxyBuffer) Put ¶
func (ReverseProxyBuffer) Put(b []byte)
Click to show internal directories.
Click to hide internal directories.