Ejemplo n.º 1
0
        // Shoot MSG
        private ShootMsg GetSMSG(byte[] msg, Int64 msgSize)
        {
            Int32 type = ByteInt32(msg[8]);

            byte[] seq_num = new byte[4];
            byte[] vars    = new byte[msgSize - 13];

            Array.Copy(msg, 9, seq_num, 0, 4);
            Array.Copy(msg, 13, vars, 0, msgSize - 13);

            ShootMsg SMSG = SMSGVars(vars);

            SMSG.msgType = type;
            return(SMSG);
        }
Ejemplo n.º 2
0
 public byte[] SerializeMSG(ShootMsg msg)
 {
     byte[] header = Header(msg.msgType);
     byte[] body   = BuildMSG(msg.from);
     return(Combine(IntByte((Int64)8 + header.Length + body.Length), header, body));
 }
Ejemplo n.º 3
0
        private ShootMsg SMSGVars(byte[] from)
        {
            ShootMsg msg = new ShootMsg(ByteInt32(from));

            return(msg);
        }