pub struct MulticastEnableLoopback(/* private fields */);
Expand description
Socket option determining whether outgoing multicast packets will be received on the same socket if it is a member of the multicast group.
Implements the IPPROTO_IP/IP_MULTICAST_LOOP or IPPROTO_IPV6/IPV6_MULTICAST_LOOP socket option.
§Examples
Setting the option:
use asyncio::*;
use asyncio::ip::*;
let ctx = &IoContext::new().unwrap();
let soc = UdpSocket::new(ctx, Udp::v4()).unwrap();
soc.set_option(MulticastEnableLoopback::new(true)).unwrap();
Getting the option:
use asyncio::*;
use asyncio::ip::*;
let ctx = &IoContext::new().unwrap();
let soc = UdpSocket::new(ctx, Udp::v4()).unwrap();
let opt: MulticastEnableLoopback = soc.get_option().unwrap();
let is_set: bool = opt.get();
Implementations§
Trait Implementations§
Source§impl Clone for MulticastEnableLoopback
impl Clone for MulticastEnableLoopback
Source§fn clone(&self) -> MulticastEnableLoopback
fn clone(&self) -> MulticastEnableLoopback
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 moreSource§impl Default for MulticastEnableLoopback
impl Default for MulticastEnableLoopback
Source§fn default() -> MulticastEnableLoopback
fn default() -> MulticastEnableLoopback
Returns the “default value” for a type. Read more
Source§impl<P: IpProtocol> GetSocketOption<P> for MulticastEnableLoopback
impl<P: IpProtocol> GetSocketOption<P> for MulticastEnableLoopback
Source§impl<P: IpProtocol> SetSocketOption<P> for MulticastEnableLoopback
impl<P: IpProtocol> SetSocketOption<P> for MulticastEnableLoopback
Auto Trait Implementations§
impl Freeze for MulticastEnableLoopback
impl RefUnwindSafe for MulticastEnableLoopback
impl Send for MulticastEnableLoopback
impl Sync for MulticastEnableLoopback
impl Unpin for MulticastEnableLoopback
impl UnwindSafe for MulticastEnableLoopback
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