Struct asyncio::ip::MulticastEnableLoopback
[−]
[src]
pub struct MulticastEnableLoopback(_);
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();
Methods
impl MulticastEnableLoopback
[src]
Trait Implementations
impl Default for MulticastEnableLoopback
[src]
fn default() -> MulticastEnableLoopback
Returns the "default value" for a type. Read more
impl Clone for MulticastEnableLoopback
[src]
fn clone(&self) -> MulticastEnableLoopback
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more