예제 #1
0
        public static unpackOutput UnserializeEvent(byte[] buffer)
        {
            unpackOutput output = new unpackOutput();

            output.eventId = buffer[0];

            byte[] tmpBuffer = new byte[buffer.Length - 1];
            Buffer.BlockCopy(buffer, 1, tmpBuffer, 0, tmpBuffer.Length);
            output.data = UnserializeData(tmpBuffer);

            return(output);
        }
예제 #2
0
        public static unpackOutput UnserializeInternal(byte[] buffer)
        {
            unpackOutput output = new unpackOutput();

            output.eventId  = buffer[0];
            output.methodId = buffer[1];

            byte[] tmpBuffer = new byte[buffer.Length - 2];
            Buffer.BlockCopy(buffer, 2, tmpBuffer, 0, tmpBuffer.Length);
            output.data = UnserializeData(tmpBuffer);

            return(output);
        }
예제 #3
0
        public static unpackOutput UnserializeRpc(byte[] buffer)
        {
            unpackOutput output = new unpackOutput();

            output.eventId  = buffer[0];
            output.objectId = BitConverter.ToUInt16(buffer, 1);
            output.methodId = buffer[3];

            byte[] tmpBuffer = new byte[buffer.Length - 4];
            Buffer.BlockCopy(buffer, 4, tmpBuffer, 0, tmpBuffer.Length);
            output.data = UnserializeData(tmpBuffer);

            return(output);
        }