Пример #1
0
    public void StartMFQTcpClient(RunAtType runAtType, string remoteID, string inUserID)
    {
        string log = "开始连接讲盘服务器,请等待";

        GlobalDebug.Addline(log);
        Debug.Log(log);
        remoteGUI.DisplayHelpInfo();
        remoteGUI.SetHelpInfoString(log);

        if (runAtType == RunAtType.None)
        {
            return;
        }
        else if (runAtType == RunAtType.Master)
        {
            roomID = inUserID;
        }
        else if (runAtType == RunAtType.Slave)
        {
            roomID = remoteID;
        }

        userID = inUserID;

//        sendOnlinePastTime = 0;

        StartCoroutine(WaitingReceiveIE());
        RemoteGather.SetupRemoteGather();
        mfqTcpClient = new MFQTcpClient(this);
    }
Пример #2
0
    //断开网络连接,主动断开
    public void DisConnect()
    {
//      Debug.LogError(log);

//      StopCoroutine(WaitingReceiveIE());
        StopAllCoroutines();

        isEnterRoom       = false;
        isOtherSideOnline = false;
        isUseRemoteGather = false;

        if (RemoteGather.needSendBtnCtrlMessages != null)
        {
            RemoteGather.needSendBtnCtrlMessages.Clear();
        }

        if (mfqTcpClient != null)
        {
            mfqTcpClient.Close();
            mfqTcpClient = null;

            string log = "断开讲盘网络";
            GlobalDebug.Addline(log);
            Debug.Log(log);
            Debug.LogWarning(log);
        }
    }
Пример #3
0
    //断开网络连接,主动断开
    public void DisConnect()
    {
        StopAllCoroutines();

        isEnterRoom       = false;
        isOtherSideOnline = false;
//      lastIsOtherSideOnline = false;
//      isUseRemoteGather = false;

//        if(RemoteGather.needSendBtnCtrlMessages!=null)
//        RemoteGather.needSendBtnCtrlMessages.Clear();

        if (mfqTcpClient != null)
        {
            mfqTcpClient.Close();
            mfqTcpClient = null;

            string log = "断开TCP连接";
            GlobalDebug.Addline(log);
            Debug.Log(log);
            Debug.LogWarning(log);
        }
    }