This commit is contained in:
2025-07-04 23:41:19 +08:00
parent 7c2c32a31a
commit f0fd00d706
27 changed files with 1206 additions and 163 deletions

View File

@@ -30,6 +30,9 @@ func (g *GatewayWsServer) OnHandShake(conn socket.ISocketConn) {
if err != nil {
_ = conn.Close()
}
if oldClient := ws_handler.UserMgr.GetByUID(t); oldClient != nil {
oldClient.CloseClient()
}
client := ws_handler.NewClient(t, conn)
ws_handler.UserMgr.Add(t, client)
conn.SetParam("client", client)