/// <summary>
    /// 连接回调
    /// </summary>
    /// <param name="ar"></param>
    void ConnectCallback(IAsyncResult ar)
    {
        try
        {
            Socket socket = (Socket)ar.AsyncState;
            socket.EndConnect(ar);
            FirstEvent(NetEvent.ConnectSuccess, "连接服务器成功");
            Debug.Log("Socket Coneect Sucess");

            // 一次成功连接
            m_IsFirstConnectSuccessed = true;

            // 消息线程
            m_MessageThread = new Thread(MessageThread);
            m_MessageThread.IsBackground = true;
            m_MessageThread.Start();

            // 心跳线程
            m_HeartThread = new Thread(PingThread);
            m_HeartThread.IsBackground = true;
            m_HeartThread.Start();

            m_Contecting = false;

            // 请求密钥
            ProtocalManager.SecretKeyRequest();



            m_Socket.BeginReceive(m_ReadBuff.Bytes, m_ReadBuff.WriteIndex, m_ReadBuff.Remain, 0, ReceiveCallback, socket);
        }
        catch (Exception ex)
        {
            Debug.LogError("Socket Coneect Fail: " + ex);
            m_Contecting = false;
        }
    }