少年修仙传客户端代码仓库
client_Zxw
2018-09-25 4dba76710a47cb8c83c5cf7f7b96702c702c5039
Core/NetworkPackage/GameNetSystem.cs
@@ -15,9 +15,11 @@
    DisconnectState disconnectState;
    NetState m_NetState;
    public NetState netState {
    public NetState netState
    {
        get { return this.m_NetState; }
        set {
        set
        {
            if (this.m_NetState != value)
            {
                switch (m_NetState)
@@ -99,9 +101,16 @@
    public void BeginConnectGameServer(string _ip, int _port, Action _onConnected)
    {
        if (socketController != null && socketController.Connected)
        try
        {
            socketController.CloseConnect();
            if (socketController != null && socketController.Connected)
            {
                socketController.CloseConnect();
            }
        }
        catch (System.Exception ex)
        {
            DebugEx.Log(ex);
        }
        socketController = new ClientSocketController();
@@ -151,7 +160,7 @@
                }
                else
                {
                    DesignDebug.LogWarningFormat("数据包(cmd:{0})未登记!", _package.cmd);
                    DebugEx.LogWarningFormat("数据包(cmd:{0})未登记!", _package.cmd);
                }
            }