public static bool TryParse(MemoryCursor cursor, out CryptoFrame result)
        {
            result = new CryptoFrame();

            if (!FrameType.TrySlice(cursor, FrameType.Crypto))
            {
                return(false);
            }

            var offset = cursor.DecodeVariable32();
            var data   = VariableLengthPayload.SliceBytes(cursor);

            result = new CryptoFrame(offset, data);

            return(true);
        }
Exemple #2
0
 public static bool TryParse(MemoryCursor cursor)
 {
     return(FrameType.TrySlice(cursor, FrameType.Padding));
 }