Exemplo n.º 1
0
 void Response(Resp r)
 {
     Debug.Log(" receive server msg : " + r.GetProtocol());
     Debug.Log(NetProtocols.TEST_A);
     if (r.GetProtocol() == NetProtocols.TEST_A)
     {
         TestAResp resp = (TestAResp)r;
         Debug.Log("int : " + resp.testint);
         Debug.Log("long : " + resp.testlong);
         Debug.Log("string : " + resp.teststring);
     }
 }
Exemplo n.º 2
0
    //接收到数据放入数据队列,按顺序取出
    void Update()
    {
        if (dataQueue.Count > 0)
        {
            NetTools.Log("dataQueue.Count : " + dataQueue.Count);
            Resp resp = ProtoManager.Instance.TryDeserialize(dataQueue.Dequeue());

            if (maskList.Contains(resp.GetProtocol()))
            {
                maskList.Remove(resp.GetProtocol());
            }
            if (maskList.Count <= 0)
            {
//				FuiController.CloseLoading();
            }
        }

        if (sendDataQueue.Count > 0)
        {
            Send();
        }
    }
Exemplo n.º 3
0
 void Response(Resp resp)
 {
     NetTools.Log("resp : " + resp.GetProtocol());
 }