pub struct Connection { /* private fields */ }Expand description
Logical connection bound to a remote UDP address. Receiving is done by reading from an mpsc channel populated by the Transport reader task.
Implementations§
Source§impl Connection
impl Connection
Trait Implementations§
Source§impl ConnectionTrait for Connection
impl ConnectionTrait for Connection
fn send<'life0, 'life1, 'async_trait>(
&'life0 self,
data: &'life1 [u8],
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn receive<'life0, 'async_trait>(
&'life0 self,
timeout: Duration,
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn mrp_params(&self) -> MrpParameters
fn mrp_params(&self) -> MrpParameters
Peer MRP intervals used for retransmission timing. Defaults to spec
defaults unless overridden via
ConnectionTrait::set_mrp_params.Source§fn set_mrp_params(&self, params: MrpParameters)
fn set_mrp_params(&self, params: MrpParameters)
Set peer MRP intervals (typically from its mDNS SII/SAI/SAT TXT records).
Source§fn last_received_elapsed(&self) -> Option<Duration>
fn last_received_elapsed(&self) -> Option<Duration>
Time since the last message was received from the peer, if any.
Used to select the active vs idle retransmission interval.
Source§fn is_reliable(&self) -> bool
fn is_reliable(&self) -> bool
True for transports (BTP) that guarantee delivery so Matter-layer MRP
retransmit should be suppressed. Default: false (UDP).
Auto Trait Implementations§
impl !Freeze for Connection
impl !RefUnwindSafe for Connection
impl Send for Connection
impl Sync for Connection
impl Unpin for Connection
impl UnsafeUnpin for Connection
impl !UnwindSafe for Connection
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