Struct asyncio::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 asyncio::*; use asyncio::ip::*; let ctx = &IoContext::new().unwrap(); let soc = UdpSocket::new(ctx, 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