yyl
2026-05-08 ea4e25ceca21484cbb422b4ce49ec6bc1220441f
Main/Core/NetworkPackage/GameNetSystem.cs
@@ -2,6 +2,7 @@
using System;
using System.Collections;
using System.Collections.Generic;
using Cysharp.Threading.Tasks;
public class GameNetSystem : Singleton<GameNetSystem>
@@ -117,6 +118,8 @@
            Debug.Log(ex);
        }
        Debug.unityLogger.logEnabled = true;
        mainSocket = new ClientSocket(ServerType.Main);
        //  websocket的断开链接需要处理一下
        mainSocket.OnDisconnected = () =>
@@ -165,7 +168,7 @@
                SendInfo(sendQueue.Dequeue());
            }
        }
        Debug.LogError($"重点提醒:0403登录后 发送缓存包数量 {cnt} 个");
        Debug.Log($"重点提醒:0403登录后 发送缓存包数量 {cnt} 个");
    }
    public void SendInfo(GameNetPackBasic protocol)
@@ -184,7 +187,7 @@
        {
            if (protocol is not C0123_tagCClientPackVersion && protocol is not C0101_tagCPlayerLogin)
            {
                Debug.LogError("重点提醒:登录完成前的封包先加入队列 等0403回包后再一起发送服务端 " + protocol.ToString());
                Debug.Log("重点提醒:登录完成前的封包先加入队列 等0403回包后再一起发送服务端 " + protocol.ToString());
                sendQueue.Enqueue(protocol);
                return;
            }
@@ -299,7 +302,7 @@
            LoginManager.Instance.busy = false;
            StageManager.Instance.ReturnToLoginScene();
            StageManager.Instance.ReturnToLoginScene().Forget();
            NetLinkWin.Hide();
        }
    }