Trait s2n_quic_core::datagram::traits::Sender
source · pub trait Sender: 'static + Send {
// Required methods
fn on_transmit<P: Packet>(&mut self, packet: &mut P);
fn has_transmission_interest(&self) -> bool;
fn on_connection_error(&mut self, error: Error);
}
Expand description
Allows users to configure the behavior of sending datagrams.
Required Methods§
sourcefn on_transmit<P: Packet>(&mut self, packet: &mut P)
fn on_transmit<P: Packet>(&mut self, packet: &mut P)
A callback that allows users to write datagrams directly to the packet
sourcefn has_transmission_interest(&self) -> bool
fn has_transmission_interest(&self) -> bool
A callback that checks if a user has datagrams ready to send
Use method to trigger the on_transmit callback
sourcefn on_connection_error(&mut self, error: Error)
fn on_connection_error(&mut self, error: Error)
A callback used to notify the application in the case of a connection error
Object Safety§
This trait is not object safe.