25 lines
614 B
Go
25 lines
614 B
Go
package systemtime
|
|
|
|
import (
|
|
"blazing/common/socket/handler"
|
|
"time"
|
|
)
|
|
|
|
// LoginSidInfo 登录携带的凭证结构体
|
|
type InInfo struct { //这里直接使用组合来实现将传入的原始头部数据和结构体参数序列化
|
|
Head handler.TomeeHeader `cmd:"1002" struc:"[0]pad"` //玩家登录
|
|
|
|
}
|
|
|
|
// OutInfo 表示系统时间的出站消息
|
|
type OutInfo struct {
|
|
SystemTime uint32 `json:"systemTime"` // @UInt long类型
|
|
}
|
|
|
|
// NewOutInfo 创建新的系统时间消息实例
|
|
func NewOutInfo() *OutInfo {
|
|
return &OutInfo{
|
|
SystemTime: uint32(time.Now().Unix()), // 获取当前时间戳(秒)
|
|
}
|
|
}
|