pub struct FrameBatchingCoordinator { /* private fields */ }Expand description
Frame batching coordinator for reduced packet overhead
Implementations§
Source§impl FrameBatchingCoordinator
impl FrameBatchingCoordinator
Sourcepub fn new(config: FrameBatchingConfig) -> Self
pub fn new(config: FrameBatchingConfig) -> Self
Create a new frame batching coordinator
Sourcepub async fn start(&mut self) -> Result<(), Box<dyn Error + Send + Sync>>
pub async fn start(&mut self) -> Result<(), Box<dyn Error + Send + Sync>>
Start the frame batching coordinator
Sourcepub async fn add_frame(
&self,
destination: SocketAddr,
frame_type: u8,
payload: Vec<u8>,
priority: FramePriority,
) -> Result<Option<Vec<u8>>, Box<dyn Error + Send + Sync>>
pub async fn add_frame( &self, destination: SocketAddr, frame_type: u8, payload: Vec<u8>, priority: FramePriority, ) -> Result<Option<Vec<u8>>, Box<dyn Error + Send + Sync>>
Add frame to batch
Sourcepub async fn get_stats(&self) -> FrameBatchingStats
pub async fn get_stats(&self) -> FrameBatchingStats
Get batching statistics
Trait Implementations§
Auto Trait Implementations§
impl Freeze for FrameBatchingCoordinator
impl RefUnwindSafe for FrameBatchingCoordinator
impl Send for FrameBatchingCoordinator
impl Sync for FrameBatchingCoordinator
impl Unpin for FrameBatchingCoordinator
impl UnwindSafe for FrameBatchingCoordinator
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