Example #1
0
    public override void OnUpdate()
    {
        base.OnUpdate();

        if (mSocket != null)
        {
            mSocket.ProcessTimeOut();
            if (mSocket != null)
            {
                SocketPackage data = mSocket.Dequeue();
                if (data != null)
                {
                    OnSocketRespond(data);
                }
            }
            if (mSocket != null)
            {
                SocketPackage data = mSocket.DequeuePush();
                if (data != null)
                {
                    OnPushCallback(data);
                }
            }
        }
    }
Example #2
0
 private void Update()
 {
     if (mSocket != null)
     {
         mSocket.ProcessTimeOut();
         SocketPackage data = mSocket.Dequeue();
         if (data != null)
         {
             OnSocketRespond(data);
         }
         data = mSocket.DequeuePush();
         if (data != null)
         {
             OnPushCallback(data);
         }
     }
     lock (mStatusList)
     {
         if (mStatusList.Count > 0)
         {
             for (int i = 0; i < mStatusList.Count; i++)
             {
                 Dispatch(mStatusList[i]);
             }
             mStatusList.Clear();
         }
     }
 }
Example #3
0
 void Update()
 {
     if (mSocket != null)
     {
         mSocket.ProcessTimeOut();
         SocketPackage data = mSocket.Dequeue();
         if (data != null)
         {
             OnSocketRespond(data);
         }
     }
 }
Example #4
0
 void Update()
 {
     if (mSocket != null)
     {
         mSocket.ProcessTimeOut();
         SocketPackage data = mSocket.Dequeue();
         if (data != null)
         {
             OnSocketRespond(data);
         }
         if (mSocket == null)
         {
             return;
         }
         data = mSocket.DequeuePush();
         if (data != null)
         {
             OnPushCallback(data);
         }
     }
 }