gameserver

package
Version: v0.0.0-...-1446c6c Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2021 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	IM_EVENT_JOIN = iota
	IM_EVENT_BROADCAST_JOIN
	IM_EVENT_LEAVE
	IM_EVENT_BROADCAST_LEAVE
	IM_EVENT_MESSAGE
	IM_EVENT_BROADCAST_MESSAGE
	IM_EVENT_HEART
	IM_EVENT_BROADCAST_HEART
)

Variables

This section is empty.

Functions

func NewArchive

func NewArchive(event IM_protocol)

NewArchive saves new event to archive list.

Types

type EventType

type EventType int

type IM_protocol

type IM_protocol struct {
	Type      EventType // JOIN, LEAVE, MESSAGE
	Msg       string
	SocketId  uint32
	Users     IM_protocol_user
	Timestamp int // Unix timestamp (secs)
}

用户交互协议

func GetEvents

func GetEvents(lastReceived int) []IM_protocol

GetEvents returns all events after lastReceived.

type IM_protocol_user

type IM_protocol_user struct {
	To         uint32
	From       uint32
	SessKey    uint32
	ChatChanId uint32
}

用户描述信息

Source Files

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL