Esempio n. 1
0
        public void SendCommand <T>(uint id1, uint id2, T cmd)
        {
            byte[] pbdata = ProtoBufSerialize.Serialize(cmd);
            sendCache.Clear();

            CUtility.UInt8ToBytes(id1, sendCache);
            CUtility.UInt8ToBytes(id2, sendCache);
            CUtility.UInt32ToBytes(AddSendPackCount(), sendCache);
            CUtility.BytesToBytes(pbdata, pbdata.Length, sendCache);

            Send(sendCache.ToArray());
        }