msg

package
v0.0.0-...-5a37ffa Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2018 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Ack

type Ack struct {
	UserID    int64
	TimeStamp int64
}

func (*Ack) MsgNO

func (m *Ack) MsgNO() uint16

func (*Ack) RecvMsg

func (m *Ack) RecvMsg(srcID int, logT *log.TraceInfoST)

type Move

type Move struct {
	Edge uint32 //Move 和 Edge 合成一个消息; 0:表示Move,1:表示Edge,即表示是边界外的位置,不需要给她发广播消息

	UserID    uint64
	Timestamp int64
	Geohash   uint64
	X, Y, Z   float32 //U3D 的原始坐标?
	Dir       float32 //direction 方向
	Dress     []byte
}

Move 是移动消息,同时,还要给对方发送附近的人

func (*Move) MsgNO

func (m *Move) MsgNO() uint16

func (*Move) RecvMsg

func (m *Move) RecvMsg(connID int, logT *log.TraceInfoST)

RecvMsg 如果收到Move消息,则会调用此函数

type NearbyList

type NearbyList struct {
	UserID      uint64
	NearbyUsers []uint64
	Timestamp   int64
}

NearbyList 是附近的人列表变化(靠近、离开)

func (*NearbyList) MsgNO

func (m *NearbyList) MsgNO() uint16

func (*NearbyList) RecvMsg

func (m *NearbyList) RecvMsg(connID int, logT *log.TraceInfoST)

RecvMsg ServiceInfo消息是服务器连接后第一个要发送的消息,接收到这个消息后,才能开始服务

type ServiceInfo

type ServiceInfo struct {
	ServiceID string
}

func (*ServiceInfo) MsgNO

func (m *ServiceInfo) MsgNO() uint16

func (*ServiceInfo) RecvMsg

func (m *ServiceInfo) RecvMsg(connID int, logT *log.TraceInfoST)

RecvMsg ServiceInfo消息是服务器连接后第一个要发送的消息,接收到这个消息后,才能开始服务

Jump to

Keyboard shortcuts

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