Skip to main content

find_slot

Function find_slot 

Source
pub fn find_slot(len: usize, is_free: impl Fn(usize) -> bool) -> EnqueueOutcome
Expand description

空きスロットを探す。is_free(i) が真のスロットのうち最小の添字を返す。

満杯なら Dropped満杯を黙って上書きしない (送信待ちのパケットを壊すと、相手から見て途中が欠けたストリームになる)。