protocol

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2021 License: MIT Imports: 7 Imported by: 4

Documentation

Index

Constants

View Source
const (
	ProtoMask uint32 = 0x80000000
	EMsgMask         = ^ProtoMask
)

Variables

This section is empty.

Functions

func BrodcastMsgProtobuf

func BrodcastMsgProtobuf(conn net.Conn, eMsg pb.EMSG, body proto.Message) (err error)

func NewMsgProtobuf

func NewMsgProtobuf(eMsg pb.EMSG, body proto.Message) (buffer *bytes.Buffer, err error)

Types

type Packet

type Packet struct {
	EMsg    pb.EMSG
	IsProto bool
	Data    []byte
}

Represents an incoming, partially unread message.

func NewPacket

func NewPacket(data []byte) (*Packet, error)

func (*Packet) ReadProtoMsg

func (p *Packet) ReadProtoMsg(body proto.Message) error

Jump to

Keyboard shortcuts

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