protocol

package
v0.5.14 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2022 License: MIT Imports: 9 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CmdFunc added in v0.3.0

type CmdFunc func(*queue.Manager[any]) any

type CmdTree added in v0.3.0

type CmdTree struct {
	// contains filtered or unexported fields
}

func NewCmdTree added in v0.3.0

func NewCmdTree(cmd *queue.Manager[any]) *CmdTree

func (*CmdTree) Do added in v0.3.0

func (m *CmdTree) Do(f CmdFunc) any

func (*CmdTree) PushChild added in v0.3.0

func (m *CmdTree) PushChild(child *CmdTree)

func (*CmdTree) PushCmd added in v0.3.0

func (m *CmdTree) PushCmd(v any)

type Manager

type Manager struct {
	// contains filtered or unexported fields
}

Manager to protocol

func New

func New() *Manager

New Manager

func (*Manager) Pack added in v0.2.2

func (m *Manager) Pack(module any) []byte

func (*Manager) PackFunc added in v0.2.2

func (m *Manager) PackFunc(info []byte) []byte

func (*Manager) PackNet added in v0.2.2

func (m *Manager) PackNet(list [][]byte) []byte

func (*Manager) PackSize added in v0.2.2

func (m *Manager) PackSize(buf []byte) (int, int, bool)

func (*Manager) Read added in v0.2.2

func (m *Manager) Read(conn net.Conn, size int, buf []byte) ([]byte, error)

func (*Manager) Unpack added in v0.2.2

func (m *Manager) Unpack(buf []byte) (*queue.Manager[any], *qerror.Error)

func (*Manager) UnpackNet added in v0.3.0

func (m *Manager) UnpackNet(buf []byte) (*queue.Manager[*CmdTree], *qerror.Error)

func (*Manager) Write added in v0.3.0

func (m *Manager) Write(buf []byte) []byte

type VarType

type VarType byte

Jump to

Keyboard shortcuts

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