pub struct UdpConfig { /* private fields */ }Available on crate feature
transport-udp and (crate features std or tokio) only.Expand description
MAVLink address for a UDP server client or broadcast connection
Implementations§
Source§impl UdpConfig
impl UdpConfig
Sourcepub fn new(address: String, mode: UdpMode) -> Self
pub fn new(address: String, mode: UdpMode) -> Self
Creates a UDP connection address.
The type of connection depends on the UdpMode
Sourcepub fn read_timeout(self, timeout: Duration) -> Self
pub fn read_timeout(self, timeout: Duration) -> Self
Sets the read timeout on the UDP socket.
When set, recv() and recv_raw() will return an error after the
specified duration instead of blocking indefinitely. This is useful
for implementing graceful shutdown.
Trait Implementations§
Source§impl AsyncConnectable for UdpConfig
Available on crate feature tokio only.
impl AsyncConnectable for UdpConfig
Available on crate feature
tokio only.Source§impl Connectable for UdpConfig
impl Connectable for UdpConfig
Auto Trait Implementations§
impl Freeze for UdpConfig
impl RefUnwindSafe for UdpConfig
impl Send for UdpConfig
impl Sync for UdpConfig
impl Unpin for UdpConfig
impl UnsafeUnpin for UdpConfig
impl UnwindSafe for UdpConfig
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