Пример #1
0
        public static HeartbeatReply Deserialze(byte[] data)
        {
            byte[] body = new byte[data.Length - 2];
            Array.Copy(data, 2, body, 0, data.Length - 2);
            HeartbeatReply msg = HeartbeatReply.Parse(body);

            return(msg);
        }
Пример #2
0
        public static HeartbeatReply Parse(byte[] data)
        {
            var            num = BitConverter.ToInt32(data, 0);
            HeartbeatReply msg = new HeartbeatReply();

            msg.number = num;
            return(msg);
        }