Struct swiftlet_quic::EndpointHandler
source · pub struct EndpointHandler<'a> { /* private fields */ }
Expand description
Main library structure that handles the QUIC Endpoint
Implementations§
source§impl<'a> EndpointHandler<'a>
impl<'a> EndpointHandler<'a>
sourcepub fn new(
endpoint: &'a mut Endpoint,
events: &'a mut dyn EndpointEventCallbacks
) -> Self
pub fn new( endpoint: &'a mut Endpoint, events: &'a mut dyn EndpointEventCallbacks ) -> Self
Create a QUIC Endpoint Handler by giving it an already created Endpoint and a mutable reference of a structure that implements the Endpoint Event Callbacks trait.
sourcepub fn run_event_loop(&mut self, tick_duration: Duration) -> Result<bool, Error>
pub fn run_event_loop(&mut self, tick_duration: Duration) -> Result<bool, Error>
QUIC Endpoint Handler Event Loop
Allows the endpoint handler to take control of the thread!
Communicates with the application code with the previously passed event callbacks
Tick “0” callback will happen immediately
Returns true if this event loop function should be maybe called again (ie. run a client endpoint in “low power” mode when it has no connections)
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for EndpointHandler<'a>
impl<'a> !Send for EndpointHandler<'a>
impl<'a> !Sync for EndpointHandler<'a>
impl<'a> Unpin for EndpointHandler<'a>
impl<'a> !UnwindSafe for EndpointHandler<'a>
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