Rollup merge of #130922 - tyilo:udp-unspecified, r=ibraheemdev

Reference UNSPECIFIED instead of INADDR_ANY in join_multicast_v4
This commit is contained in:
Matthias Krüger 2024-09-28 09:35:09 +02:00 committed by GitHub
commit 9c4b81c238
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -579,8 +579,8 @@ pub fn ttl(&self) -> io::Result<u32> {
/// This function specifies a new multicast group for this socket to join. /// This function specifies a new multicast group for this socket to join.
/// The address must be a valid multicast address, and `interface` is the /// The address must be a valid multicast address, and `interface` is the
/// address of the local interface with which the system should join the /// address of the local interface with which the system should join the
/// multicast group. If it's equal to `INADDR_ANY` then an appropriate /// multicast group. If it's equal to [`UNSPECIFIED`](Ipv4Addr::UNSPECIFIED)
/// interface is chosen by the system. /// then an appropriate interface is chosen by the system.
#[stable(feature = "net2_mutators", since = "1.9.0")] #[stable(feature = "net2_mutators", since = "1.9.0")]
pub fn join_multicast_v4(&self, multiaddr: &Ipv4Addr, interface: &Ipv4Addr) -> io::Result<()> { pub fn join_multicast_v4(&self, multiaddr: &Ipv4Addr, interface: &Ipv4Addr) -> io::Result<()> {
self.0.join_multicast_v4(multiaddr, interface) self.0.join_multicast_v4(multiaddr, interface)