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]

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

impl Clone for MulticastEnableLoopback
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

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

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

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