Struct de_net::connection::delivery::DeliveryHandler
source · pub(crate) struct DeliveryHandler {
book: Arc<Mutex<ConnectionBook<ConnDeliveryHandler>>>,
}
Fields§
§book: Arc<Mutex<ConnectionBook<ConnDeliveryHandler>>>
Implementations§
source§impl DeliveryHandler
impl DeliveryHandler
pub(crate) fn new() -> Self
pub(crate) async fn lock(&mut self) -> ReceiveHandlerGuard<'_>
sourcepub(crate) async fn send_confirms(
&mut self,
time: Instant,
force: bool,
datagrams: &mut Sender<OutDatagram>
) -> Result<Instant, SendError<OutDatagram>>
pub(crate) async fn send_confirms( &mut self, time: Instant, force: bool, datagrams: &mut Sender<OutDatagram> ) -> Result<Instant, SendError<OutDatagram>>
Send package confirmation datagrams.
Not all confirmations are sent because there is a small delay to enable grouping.
§Arguments
-
time
- current time. -
force
- if true, all pending confirmations will be sent. -
datagrams
- output datagrams with the confirmations will be send to this channel.
§Returns
On success, it returns an estimation of the next resend schedule time.
pub(crate) async fn clean(&mut self, time: Instant)
Trait Implementations§
source§impl Clone for DeliveryHandler
impl Clone for DeliveryHandler
source§fn clone(&self) -> DeliveryHandler
fn clone(&self) -> DeliveryHandler
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for DeliveryHandler
impl !RefUnwindSafe for DeliveryHandler
impl Send for DeliveryHandler
impl Sync for DeliveryHandler
impl Unpin for DeliveryHandler
impl !UnwindSafe for DeliveryHandler
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