needsFlushing

fun needsFlushing(flushThresholdInBytes: Int, flushThresholdInGroups: Int): Boolean

Checks if the client needs flushing based on the input thresholds.

Parameters

flushThresholdInBytes

the number of bytes that must be written since the last flush, before a flush will occur. Note that the flush only occurs in this case if at least one full group has been finished, as there's no reason to flush an incomplete group, the client will not be able to continue anyhow.

flushThresholdInGroups

the number of full groups written to the client before a flush should occur.