Esempio n. 1
0
        public static byte[] Create(PackageReqHead head, BaseReqData data)
        {
            WriteHead(head);
            WriteData(data);

            return(WriteBytesLength());
        }
Esempio n. 2
0
        public static byte[] Create(int actionId, BaseReqData data)
        {
            var head = new PackageReqHead()
            {
                ActionId = actionId, MsgId = ++MsgCounter
            };

            WriteHead(head);
            WriteData(data);
            Console.WriteLine("Send: {0}", _sendStr);
            var bytes = WriteBytesLength();

            _sendStr = "";
            return(bytes);
        }
Esempio n. 3
0
 private static void WriteHead(PackageReqHead head)
 {
     _sendStr += string.Format("MsgId={0}&ActionId={1}", head.MsgId, head.ActionId);
 }