proto_head

package
v0.0.0-...-d098e83 Latest Latest
Warning

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

Go to latest
Published: May 23, 2021 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const GProtoHeadLength uint32 = 24

GProtoHeadLength 包头长度

Variables

This section is empty.

Functions

func GetProtoHead

func GetProtoHead(buf []byte) (packetLength PacketLength, messageID MessageID, sessionID SessionID, resultID ResultID, userID UserID)

获取协议包头

Types

type MessageID

type MessageID uint32

MessageID 消息ID

type PacketLength

type PacketLength uint32

PacketLength 包总长度

func GetPacketLength

func GetPacketLength(buf []byte) (packetLength PacketLength)

////////////////////////////////////////////////////////////////////////////// 获取协议包头长度

type ProtoHead

type ProtoHead struct {
	PacketLength PacketLength //总包长度,包含包头+包体长度
	MessageID    MessageID    //消息号
	SessionID    SessionID    //会话id
	ResultID     ResultID     //结果id
	UserID       UserID       //用户id
}

ProtoHead 协议包头

type ResultID

type ResultID uint32

ResultID 结果ID

type SessionID

type SessionID uint32

SessionID 会话ID

type UserID

type UserID uint64

UserID 玩家ID

Jump to

Keyboard shortcuts

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