| | |
| | | using System; |
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using Cysharp.Threading.Tasks; |
| | | |
| | | |
| | | public class GameNetSystem : Singleton<GameNetSystem> |
| | |
| | | Debug.Log(ex); |
| | | } |
| | | |
| | | Debug.unityLogger.logEnabled = true; |
| | | |
| | | mainSocket = new ClientSocket(ServerType.Main); |
| | | // websocket的断开链接需要处理一下 |
| | | mainSocket.OnDisconnected = () => |
| | |
| | | SendInfo(sendQueue.Dequeue()); |
| | | } |
| | | } |
| | | Debug.LogError($"重点提醒:0403登录后 发送缓存包数量 {cnt} 个"); |
| | | Debug.Log($"重点提醒:0403登录后 发送缓存包数量 {cnt} 个"); |
| | | } |
| | | |
| | | public void SendInfo(GameNetPackBasic protocol) |
| | |
| | | { |
| | | 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; |
| | | } |
| | |
| | | |
| | | LoginManager.Instance.busy = false; |
| | | |
| | | StageManager.Instance.ReturnToLoginScene(); |
| | | StageManager.Instance.ReturnToLoginScene().Forget(); |
| | | NetLinkWin.Hide(); |
| | | } |
| | | } |