Struct asyncio::ip::MulticastHops
[−]
[src]
pub struct MulticastHops(_);
Socket option for time-to-live associated with outgoing multicast packets.
Implements the IPPROTO_IP/IP_MULTICAST_TTL or IPPROTO_IPV6/IPV6_MULTICAST_HOPS 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(MulticastHops::new(4)).unwrap();
Getting the option:
use asyncio::*; use asyncio::ip::*; let ctx = &IoContext::new().unwrap(); let soc = UdpSocket::new(ctx, Udp::v4()).unwrap(); let opt: MulticastHops = soc.get_option().unwrap(); let hops: u8 = opt.get();
Methods
impl MulticastHops
[src]
Trait Implementations
impl Default for MulticastHops
[src]
fn default() -> MulticastHops
Returns the "default value" for a type. Read more
impl Clone for MulticastHops
[src]
fn clone(&self) -> MulticastHops
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