Пример #1
0
        void OnConnectionStateChangedHandler(int id, CONNECTION_STATE state, CONNECTION_CHANGE_REASON reason)
        {
            string msg = string.Format("connection state changed id:{0} state:{1} reason:{2}", id, state, reason);

            Debug.Log(msg);
            messageDisplay.AddTextToDisplay(msg, Message.MessageType.Info);
        }
Пример #2
0
 private static void OnConnectionStateChangedCallback(int id, CONNECTION_STATE state, CONNECTION_CHANGE_REASON reason)
 {
     if (clientEventHandlerHandlerDic.ContainsKey(id) && clientEventHandlerHandlerDic[id].OnConnectionStateChanged != null)
     {
         if (AgoraCallbackObject.GetInstance()._CallbackQueue != null)
         {
             AgoraCallbackObject.GetInstance()._CallbackQueue.EnQueue(() => {
                 if (clientEventHandlerHandlerDic.ContainsKey(id) && clientEventHandlerHandlerDic[id].OnConnectionStateChanged != null)
                 {
                     clientEventHandlerHandlerDic[id].OnConnectionStateChanged(id, state, reason);
                 }
             });
         }
     }
 }