getNextIndex

open fun getNextIndex(index: Int): Int

Returns the index of the next packet, or -1 if we've reached the end.