msgx

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2023 License: BSD-2-Clause Imports: 2 Imported by: 0

README

TODO: improve performance

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Send

func Send(writer io.Writer, msg *Message) error

func Tell

func Tell(writer io.Writer, req *Message) error

Types

type Message

type Message struct {
	Comd uint8  // 0-255, allow max 256 commands
	Flag uint16 // 0-65535
	Args map[string]string
	// contains filtered or unexported fields
}

Message

func Call

func Call(readWriter io.ReadWriter, req *Message, maxSize int32) (*Message, error)

func NewMessage

func NewMessage(comd uint8, flag uint16, args map[string]string) *Message

func Recv

func Recv(reader io.Reader, maxSize int32) (*Message, error)

func (*Message) Get

func (m *Message) Get(name string) string

func (*Message) IsCall

func (m *Message) IsCall() bool

func (*Message) IsTell

func (m *Message) IsTell() bool

func (*Message) Set

func (m *Message) Set(name string, value string)

func (*Message) SetCall

func (m *Message) SetCall()

func (*Message) SetTell

func (m *Message) SetTell()

Jump to

Keyboard shortcuts

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