pub struct AckManager { /* private fields */ }Expand description
Keeps track of sent & received packets, and contains ack information that is copied into the standard header on each outgoing packet
Implementations§
Source§impl AckManager
impl AckManager
pub fn new() -> Self
pub fn should_send_empty_ack(&self) -> bool
pub fn mark_should_send_empty_ack(&mut self)
pub fn clear_should_send_empty_ack(&mut self)
Sourcepub fn next_sender_packet_index(&self) -> PacketIndex
pub fn next_sender_packet_index(&self) -> PacketIndex
Get the index of the next outgoing packet
Sourcepub fn process_incoming_header<E: Copy + Eq + Hash + Send + Sync>(
&mut self,
header: &StandardHeader,
message_manager: &mut MessageManager,
host_world_manager: &mut HostWorldManager<E>,
local_world_manager: &mut LocalWorldManager<E>,
packet_notifiables: &mut [&mut dyn PacketNotifiable],
)
pub fn process_incoming_header<E: Copy + Eq + Hash + Send + Sync>( &mut self, header: &StandardHeader, message_manager: &mut MessageManager, host_world_manager: &mut HostWorldManager<E>, local_world_manager: &mut LocalWorldManager<E>, packet_notifiables: &mut [&mut dyn PacketNotifiable], )
Process an incoming packet, handle notifications of delivered / dropped packets
pub fn next_outgoing_packet_header( &mut self, packet_type: PacketType, ) -> StandardHeader
Auto Trait Implementations§
impl Freeze for AckManager
impl RefUnwindSafe for AckManager
impl Send for AckManager
impl Sync for AckManager
impl Unpin for AckManager
impl UnwindSafe for AckManager
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