1 Star 1 Fork 0

linngc / center.gf

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
websocket_login.go 493 Bytes
一键复制 编辑 原始数据 按行查看 历史
linngc 提交于 2023-04-11 09:13 . style:调整包目录结构
// Package websocket
// @Link https://gitee.com/linngc/center.gf
// @Copyright Copyright (c) 2022 center CLI
// @Author linngc
// @License
package websocket
import "fmt"
// 用户登录
type login struct {
Unique uint64
Client *WssClient
}
// GetKey 读取客户端数据
func (l *login) GetKey() (key string) {
key = GetUniqueKey(l.Unique)
return
}
// GetUniqueKey 获取用户key
func GetUniqueKey(unique uint64) (key string) {
key = fmt.Sprintf("%s_%d", "ws", unique)
return
}
Go
1
https://gitee.com/linngc/center.gf.git
git@gitee.com:linngc/center.gf.git
linngc
center.gf
center.gf
52e4a05782b6

搜索帮助

53164aa7 5694891 3bd8fe86 5694891