message

package
v0.1.26 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Type byte = iota
	To
	From
	MId
	Msg
)

Variables

This section is empty.

Functions

func Millisecond

func Millisecond() uint32

func MsgId

func MsgId() uint32

Types

type IMessage

type IMessage interface {
	GetString(byte) string
	GetUint32(byte) uint32
	SetExString(string, string)
	GetExString(string) string
	GetExData() map[string]string
}

type TextMessage

type TextMessage struct {
	From   string
	To     string
	Msg    string
	MsgId  uint32
	ExData map[string]string
}

func NewTextMessage

func NewTextMessage(From string, To string, Msg string) *TextMessage

func (*TextMessage) GetExData added in v0.0.2

func (m *TextMessage) GetExData() map[string]string

func (*TextMessage) GetExString added in v0.0.2

func (m *TextMessage) GetExString(k string) string

func (*TextMessage) GetString

func (m *TextMessage) GetString(v byte) string

func (*TextMessage) GetUint32

func (m *TextMessage) GetUint32(v byte) uint32

func (*TextMessage) SetExString added in v0.0.2

func (m *TextMessage) SetExString(k string, v string)

Jump to

Keyboard shortcuts

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