pub struct MulticastJoinGroup(/* private fields */);
Expand description
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();
Implementations§
Source§impl MulticastJoinGroup
impl MulticastJoinGroup
pub fn new(multicast: IpAddr) -> MulticastJoinGroup
pub fn from_v4(multicast: IpAddrV4, interface: IpAddrV4) -> MulticastJoinGroup
pub fn from_v6(multicast: IpAddrV6, scope_id: u32) -> MulticastJoinGroup
Trait Implementations§
Source§impl Clone for MulticastJoinGroup
impl Clone for MulticastJoinGroup
Source§fn clone(&self) -> MulticastJoinGroup
fn clone(&self) -> MulticastJoinGroup
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<P: IpProtocol> SetSocketOption<P> for MulticastJoinGroup
impl<P: IpProtocol> SetSocketOption<P> for MulticastJoinGroup
Auto Trait Implementations§
impl Freeze for MulticastJoinGroup
impl RefUnwindSafe for MulticastJoinGroup
impl Send for MulticastJoinGroup
impl Sync for MulticastJoinGroup
impl Unpin for MulticastJoinGroup
impl UnwindSafe for MulticastJoinGroup
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more