Struct asio::ip::MulticastJoinGroup [] [src]

pub struct MulticastJoinGroup(_);

Socket option to join a multicast group on a specified interface.

Implements the IPPROTO_IP/IP_ADD_MEMBERSHIP or IPPROTO_IPV6/IPV6_JOIN_GROUP 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(MulticastJoinGroup::new(IpAddr::V4(IpAddrV4::new(225,0,0,1)))).unwrap();

Methods

impl MulticastJoinGroup
[src]

fn new(multicast: IpAddr) -> MulticastJoinGroup

fn from_v4(multicast: IpAddrV4, interface: IpAddrV4) -> MulticastJoinGroup

fn from_v6(multicast: IpAddrV6, scope_id: u32) -> MulticastJoinGroup

Trait Implementations

impl Clone for MulticastJoinGroup
[src]

fn clone(&self) -> MulticastJoinGroup

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 MulticastJoinGroup
[src]

type Data = c_void

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

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

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

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

fn size(&self) -> usize