Documentation
¶
Index ¶
- func Int16ToBytes(i uint16) []byte
- func IntToByteBigEndian(i int) []byte
- func ReadBytes(reader io.Reader, size int) ([]byte, error)
- func ReadInt(reader io.Reader) (int, error)
- type ByteBuf
- func (b *ByteBuf) Flush() error
- func (b *ByteBuf) Read(p []byte) (n int, err error)
- func (b *ByteBuf) ReadAll() ([]byte, error)
- func (b *ByteBuf) ReadBuffer() *bufio.Reader
- func (b *ByteBuf) ReadByte() (byte, error)
- func (b *ByteBuf) ReadBytes(size int) ([]byte, error)
- func (b *ByteBuf) ReadFrom(reader io.Reader) (int64, error)
- func (b *ByteBuf) ReadInt() (int, error)
- func (b *ByteBuf) ReadLine() (string, error)
- func (b *ByteBuf) Write(p []byte) (n int, err error)
- func (b *ByteBuf) WriteBuffer() *bufio.Writer
- func (b *ByteBuf) WriteByte(data byte) error
- func (b *ByteBuf) WriteBytes(data []byte) error
- func (b *ByteBuf) WriteInt(data int) error
- func (b *ByteBuf) WriteString(data string) error
- func (b *ByteBuf) WriteTo(write io.Writer) (int64, error)
- type LengthBased
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Int16ToBytes ¶ added in v1.6.1
func IntToByteBigEndian ¶
Types ¶
type ByteBuf ¶
type ByteBuf struct {
// contains filtered or unexported fields
}
ByteBuf 字节缓冲区
func NewReadByteBuf ¶
func NewWriteByteBuf ¶
func (*ByteBuf) ReadBuffer ¶
func (*ByteBuf) WriteBuffer ¶
func (*ByteBuf) WriteBytes ¶
func (*ByteBuf) WriteString ¶
type LengthBased ¶
type LengthBased struct {
// contains filtered or unexported fields
}
LengthBased 长度解码器, 重试从缓冲区解析数据帧程度
func NewLengthBased ¶
func NewLengthBased(lengthFieldOffset int, lengthFieldLength int, lengthAdjustment int, initialBytesToStrip int) *LengthBased
Click to show internal directories.
Click to hide internal directories.