feat(rpc): 更新客户端映射变量命名以符合导出规则

将 rpc.go 中的 clientmap 变量重命名为 Clientmap,使其可被其他包访问。
同时修复了拼写错误 useid1 -> userid,并在 RegisterLogic 方法中调用 Refurh 函数。

fix
This commit is contained in:
2025-11-03 19:14:34 +08:00
parent 9a802ce948
commit 9b73de4faf
9 changed files with 174 additions and 124 deletions

View File

@@ -83,7 +83,6 @@ func (s *Server) OnOpen(conn gnet.Conn) (out []byte, action gnet.Action) {
if s.network != "tcp" {
return nil, gnet.Close
}
conn.SetReadDeadline(<-time.After(3000))
if conn.Context() == nil {
conn.SetContext(player.NewClientData(conn)) //注入data