drain

fun drain(nowMillis: Long, maxFrames: Int = 64, receive: (ByteArray) -> Unit)(source)

Delivers at most maxFrames consecutive fragments, stopping at the first missing sequence. Checks deadlines before delivery and records the remaining gap after delivery, even without new input.