pack

package
v0.1.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 5, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ZPack

type ZPack struct{}

func (*ZPack) GetHeadLen

func (zp *ZPack) GetHeadLen() uint16

func (*ZPack) Pack

func (zp *ZPack) Pack(m message.ZipperMessage) (d []byte, err error)

Pack packing method

func (*ZPack) UnPack

func (zp *ZPack) UnPack(d []byte) (m message.ZipperMessage, err error)

UnPack unpacking method

type ZipperPack

type ZipperPack interface {
	// GetHeadLen get the length of the packet header information, fixed to 4
	GetHeadLen() uint16
	// Pack packing method
	Pack(m message.ZipperMessage) ([]byte, error)
	// UnPack unpacking method
	UnPack(d []byte) (message.ZipperMessage, error)
}

ZipperPack TCP data unpacking abstraction layer

func NewZPack

func NewZPack() ZipperPack

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL