Exemple #1
0
        private void ReadData()
        {
            byte[] data = NetEncode.Decode(ref receiveCache);

            if (data != null)//说明数据保存成功
            {
                if (callBackRecvOver != null)
                {
                    callBackRecvOver(data);
                }

                ReadData();
            }
            else
            {
                isReceiving = false;
            }
        }
Exemple #2
0
 public List <byte[]> GetNetBytes()
 {
     byte[] buffer = ProtoSerialize.Serialize(model);
     return(NetEncode.Encode(buffer));
 }