Struct asio::ip::OutboundInterface [] [src]

pub struct OutboundInterface(_);

Socket option for local interface to use for outgoing multicast packets.

Implements the IPPROTO_IP/IP_MULTICAST_IF socket option.

Examples

Setting the option:

use asio::*;
use asio::ip::*;

let io = &IoService::new();
let soc = UdpSocket::new(io, Udp::v4()).unwrap();

soc.set_option(OutboundInterface::new(IpAddr::V4(IpAddrV4::new(1,2,3,4))));

Methods

impl OutboundInterface
[src]

fn new(interface: IpAddr) -> OutboundInterface

fn from_v4(interface: IpAddrV4) -> OutboundInterface

fn from_v6(interface: IpAddrV6) -> OutboundInterface

Trait Implementations

impl Clone for OutboundInterface
[src]

fn clone(&self) -> OutboundInterface

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

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

type Data = u32

fn level(&self, pro: &P) -> i32

fn name(&self, pro: &P) -> i32

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

fn data(&self) -> &Self::Data

fn size(&self) -> usize