Ejemplo n.º 1
0
        public void Read(byte[] headerData)
        {
            var pos = PacketHeaderMsgPackStartPos;

            TotalSize = FastBinaryRead.UInt16(headerData, pos);
            pos      += 2;

            Id   = FastBinaryRead.UInt16(headerData, pos);
            pos += 2;

            Type = headerData[pos];
            pos += 1;
        }
Ejemplo n.º 2
0
 public static char Char(ReadOnlySpan <byte> bytes, int offset)
 {
     return((char)FastBinaryRead.UInt16(bytes, offset));
 }
Ejemplo n.º 3
0
 public static UInt16 GetTotalSize(byte[] data, int startPos)
 {
     return(FastBinaryRead.UInt16(data, startPos + PacketHeaderMsgPackStartPos));
 }
Ejemplo n.º 4
0
 public static char Char(byte[] bytes, int offset)
 {
     return((char)FastBinaryRead.UInt16(bytes, offset));
 }