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]

Returns the "default value" for a type. Read more

impl Clone for MulticastHops
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<P: IpProtocol> SocketOption<P> for MulticastHops
[src]

impl<P: IpProtocol> GetSocketOption<P> for MulticastHops
[src]

impl<P: IpProtocol> SetSocketOption<P> for MulticastHops
[src]