Exemplo n.º 1
0
        public int FindIndex(Predicate <byte> match)
        {
            int ret = _buffer.FindIndex(match);

            if ((uint)ret > SharedConstants.TooBigOrNegative)
            {
                ThrowReplay();
            }
            return(ret);
        }
Exemplo n.º 2
0
 public static int FindIndex(this IByteBuffer buf, Predicate <byte> match)
 {
     if (buf is IByteBuffer2 buffer2)
     {
         return(buffer2.FindIndex(match));
     }
     return(buf.FindIndex(buf.ReaderIndex, buf.ReadableBytes, match));
 }