struct ChunkBatchPacing {
unacknowledged_batches: u16,
desired_chunks_per_tick: f32,
batch_quota: f32,
max_unacknowledged_batches: u16,
accepted_feedback: SmallVec<[f32; 10]>,
}Expand description
Connection-wide pacing, shared across world changes and player replacements.
Unlike vanilla’s single-threaded sender, Steel unlocks the sender while encoding. ACKs are queued until the next prepare so they cannot reset an in-flight batch’s quota.
Fields§
§unacknowledged_batches: u16Committed batches whose ACK feedback has not yet been applied.
desired_chunks_per_tick: f32Client-reported rate, including fractional chunks of credit per sending tick.
batch_quota: f32Accumulated credit; preparation floors this to select whole chunks only.
max_unacknowledged_batches: u16Starts at one batch; the first ACK opens the full send window.
accepted_feedback: SmallVec<[f32; 10]>Accepted ACK rates in arrival order, bounded by the outstanding batch count.
Implementations§
Source§impl ChunkBatchPacing
impl ChunkBatchPacing
fn begin_prepare(&mut self) -> Option<usize>
fn commit_batch(&mut self, batch_size: usize)
fn record_feedback(&mut self, desired_chunks_per_tick: f32) -> bool
fn drain_feedback(&mut self)
Trait Implementations§
Source§impl Debug for ChunkBatchPacing
impl Debug for ChunkBatchPacing
Auto Trait Implementations§
impl Freeze for ChunkBatchPacing
impl RefUnwindSafe for ChunkBatchPacing
impl Send for ChunkBatchPacing
impl Sync for ChunkBatchPacing
impl Unpin for ChunkBatchPacing
impl UnsafeUnpin for ChunkBatchPacing
impl UnwindSafe for ChunkBatchPacing
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreWraps this value in an
Arc<SyncMutex<>>