Skip to content

Commit b3e9e94

Browse files
committed
rename multicast methods
1 parent 36096cf commit b3e9e94

File tree

8 files changed

+60
-60
lines changed

8 files changed

+60
-60
lines changed

library/std/src/net/tcp.rs

+16-16
Original file line numberDiff line numberDiff line change
@@ -593,16 +593,16 @@ impl TcpStream {
593593
///
594594
/// let stream = TcpStream::connect("127.0.0.1:54321")
595595
/// .expect("Couldn't connect to the server...");
596-
/// stream.set_multicast_hlim_v6(88).expect("set_hop_limit_v6 call failed");
596+
/// stream.set_multicast_hop_limit_v6(88).expect("set_multicast_hop_limit_v6 call failed");
597597
/// ```
598598
#[unstable(feature = "ipv6_hop_limit", issue = "47727")]
599-
pub fn set_multicast_hlim_v6(&self, limit: u32) -> io::Result<()> {
600-
self.0.set_multicast_hlim_v6(limit)
599+
pub fn set_multicast_hop_limit_v6(&self, limit: u32) -> io::Result<()> {
600+
self.0.set_multicast_hop_limit_v6(limit)
601601
}
602602

603603
/// Gets the value of the `IPV6_MULTICAST_HOPS` option on this socket.
604604
///
605-
/// For more information about this option, see [`TcpStream::set_multicast_hlim_v6`].
605+
/// For more information about this option, see [`TcpStream::set_multicast_hop_limit_v6`].
606606
///
607607
/// # Examples
608608
///
@@ -612,12 +612,12 @@ impl TcpStream {
612612
///
613613
/// let stream = TcpStream::connect("127.0.0.1:54321")
614614
/// .expect("Couldn't connect to the server...");
615-
/// stream.set_multicast_hlim_v6(88).expect("set_hop_limit_v6 call failed");
616-
/// assert_eq!(stream.multicast_hlim_v6().unwrap(), 88);
615+
/// stream.set_multicast_hop_limit_v6(88).expect("set_multicast_hop_limit_v6 call failed");
616+
/// assert_eq!(stream.multicast_hop_limit_v6().unwrap(), 88);
617617
/// ```
618618
#[unstable(feature = "ipv6_hop_limit", issue = "47727")]
619-
pub fn multicast_hlim_v6(&self) -> io::Result<u32> {
620-
self.0.multicast_hlim_v6()
619+
pub fn multicast_hop_limit_v6(&self) -> io::Result<u32> {
620+
self.0.multicast_hop_limit_v6()
621621
}
622622

623623
/// Gets the value of the `SO_ERROR` option on this socket.
@@ -1044,16 +1044,16 @@ impl TcpListener {
10441044
/// use std::net::TcpListener;
10451045
///
10461046
/// let listener = TcpListener::bind("127.0.0.1:54321").unwrap();
1047-
/// listener.set_multicast_hlim_v6(88).expect("set_hop_limit_v6 call failed");
1047+
/// listener.set_multicast_hop_limit_v6(88).expect("set_multicast_hop_limit_v6 call failed");
10481048
/// ```
10491049
#[unstable(feature = "ipv6_hop_limit", issue = "47727")]
1050-
pub fn set_multicast_hlim_v6(&self, limit: u32) -> io::Result<()> {
1051-
self.0.set_multicast_hlim_v6(limit)
1050+
pub fn set_multicast_hop_limit_v6(&self, limit: u32) -> io::Result<()> {
1051+
self.0.set_multicast_hop_limit_v6(limit)
10521052
}
10531053

10541054
/// Gets the value of the `IPV6_MULTICAST_HOPS` option on this socket.
10551055
///
1056-
/// For more information about this option, see [`TcpListener::set_multicast_hlim_v6`].
1056+
/// For more information about this option, see [`TcpListener::set_multicast_hop_limit_v6`].
10571057
///
10581058
/// # Examples
10591059
///
@@ -1062,12 +1062,12 @@ impl TcpListener {
10621062
/// use std::net::TcpListener;
10631063
///
10641064
/// let listener = TcpListener::bind("127.0.0.1:54321").unwrap();
1065-
/// listener.set_multicast_hlim_v6(88).expect("set_hop_limit_v6 call failed");
1066-
/// assert_eq!(listener.multicast_hlim_v6().unwrap(), 88);
1065+
/// listener.set_multicast_hop_limit_v6(88).expect("set_multicast_hop_limit_v6 call failed");
1066+
/// assert_eq!(listener.multicast_hop_limit_v6().unwrap(), 88);
10671067
/// ```
10681068
#[unstable(feature = "ipv6_hop_limit", issue = "47727")]
1069-
pub fn multicast_hlim_v6(&self) -> io::Result<u32> {
1070-
self.0.multicast_hlim_v6()
1069+
pub fn multicast_hop_limit_v6(&self) -> io::Result<u32> {
1070+
self.0.multicast_hop_limit_v6()
10711071
}
10721072

10731073
#[stable(feature = "net2_mutators", since = "1.9.0")]

library/std/src/net/udp.rs

+8-8
Original file line numberDiff line numberDiff line change
@@ -604,16 +604,16 @@ impl UdpSocket {
604604
/// use std::net::UdpSocket;
605605
///
606606
/// let socket = UdpSocket::bind("127.0.0.1:54321").expect("couldn't bind to address");
607-
/// socket.set_multicast_hlim_v6(88).expect("set_multicast_hlim_v6 call failed");
607+
/// socket.set_multicast_hop_limit_v6(88).expect("set_multicast_hop_limit_v6 call failed");
608608
/// ```
609609
#[unstable(feature = "ipv6_hop_limit", issue = "47727")]
610-
pub fn set_multicast_hlim_v6(&self, limit: u32) -> io::Result<()> {
611-
self.0.set_multicast_hlim_v6(limit)
610+
pub fn set_multicast_hop_limit_v6(&self, limit: u32) -> io::Result<()> {
611+
self.0.set_multicast_hop_limit_v6(limit)
612612
}
613613

614614
/// Gets the value of the `IPV6_MULTICAST_HOPS` option on this socket.
615615
///
616-
/// For more information about this option, see [`UdpSocket::set_multicast_hlim_v6`].
616+
/// For more information about this option, see [`UdpSocket::set_multicast_hop_limit_v6`].
617617
///
618618
/// # Examples
619619
///
@@ -622,12 +622,12 @@ impl UdpSocket {
622622
/// use std::net::UdpSocket;
623623
///
624624
/// let socket = UdpSocket::bind("127.0.0.1:54321").expect("couldn't bind to address");
625-
/// socket.set_multicast_hlim_v6(88).expect("set_multicast_hlim_v6 call failed");
626-
/// assert_eq!(socket.multicast_hlim_v6().unwrap(), 88);
625+
/// socket.set_multicast_hop_limit_v6(88).expect("set_multicast_hop_limit_v6 call failed");
626+
/// assert_eq!(socket.multicast_hop_limit_v6().unwrap(), 88);
627627
/// ```
628628
#[unstable(feature = "ipv6_hop_limit", issue = "47727")]
629-
pub fn multicast_hlim_v6(&self) -> io::Result<u32> {
630-
self.0.multicast_hlim_v6()
629+
pub fn multicast_hop_limit_v6(&self) -> io::Result<u32> {
630+
self.0.multicast_hop_limit_v6()
631631
}
632632

633633
/// Executes an operation of the `IP_ADD_MEMBERSHIP` type.

library/std/src/sys/hermit/net.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -217,11 +217,11 @@ impl TcpStream {
217217
unsupported()
218218
}
219219

220-
pub fn set_multicast_hlim_v6(&self, _: u32) -> io::Result<()> {
220+
pub fn set_multicast_hop_limit_v6(&self, _: u32) -> io::Result<()> {
221221
unsupported()
222222
}
223223

224-
pub fn multicast_hlim_v6(&self) -> io::Result<u32> {
224+
pub fn multicast_hop_limit_v6(&self) -> io::Result<u32> {
225225
unsupported()
226226
}
227227

@@ -290,11 +290,11 @@ impl TcpListener {
290290
unsupported()
291291
}
292292

293-
pub fn set_multicast_hlim_v6(&self, _: u32) -> io::Result<()> {
293+
pub fn set_multicast_hop_limit_v6(&self, _: u32) -> io::Result<()> {
294294
unsupported()
295295
}
296296

297-
pub fn multicast_hlim_v6(&self) -> io::Result<u32> {
297+
pub fn multicast_hop_limit_v6(&self) -> io::Result<u32> {
298298
unsupported()
299299
}
300300

@@ -432,11 +432,11 @@ impl UdpSocket {
432432
unsupported()
433433
}
434434

435-
pub fn set_multicast_hlim_v6(&self, _: u32) -> io::Result<()> {
435+
pub fn set_multicast_hop_limit_v6(&self, _: u32) -> io::Result<()> {
436436
unsupported()
437437
}
438438

439-
pub fn multicast_hlim_v6(&self) -> io::Result<u32> {
439+
pub fn multicast_hop_limit_v6(&self) -> io::Result<u32> {
440440
unsupported()
441441
}
442442

library/std/src/sys/sgx/net.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -216,11 +216,11 @@ impl TcpStream {
216216
sgx_ineffective(DEFAULT_FAKE_HLIM)
217217
}
218218

219-
pub fn set_multicast_hlim_v6(&self, _: u32) -> io::Result<()> {
219+
pub fn set_multicast_hop_limit_v6(&self, _: u32) -> io::Result<()> {
220220
sgx_ineffective(())
221221
}
222222

223-
pub fn multicast_hlim_v6(&self) -> io::Result<u32> {
223+
pub fn multicast_hop_limit_v6(&self) -> io::Result<u32> {
224224
sgx_ineffective(DEFAULT_FAKE_HLIM)
225225
}
226226

@@ -308,11 +308,11 @@ impl TcpListener {
308308
sgx_ineffective(DEFAULT_FAKE_HLIM)
309309
}
310310

311-
pub fn set_multicast_hlim_v6(&self, _: u32) -> io::Result<()> {
311+
pub fn set_multicast_hop_limit_v6(&self, _: u32) -> io::Result<()> {
312312
sgx_ineffective(())
313313
}
314314

315-
pub fn multicast_hlim_v6(&self) -> io::Result<u32> {
315+
pub fn multicast_hop_limit_v6(&self) -> io::Result<u32> {
316316
sgx_ineffective(DEFAULT_FAKE_HLIM)
317317
}
318318

@@ -462,11 +462,11 @@ impl UdpSocket {
462462
self.0
463463
}
464464

465-
pub fn set_multicast_hlim_v6(&self, limit: u32) -> io::Result<()> {
465+
pub fn set_multicast_hop_limit_v6(&self, limit: u32) -> io::Result<()> {
466466
self.0
467467
}
468468

469-
pub fn multicast_hlim_v6(&self) -> io::Result<u32> {
469+
pub fn multicast_hop_limit_v6(&self) -> io::Result<u32> {
470470
self.0
471471
}
472472

library/std/src/sys/unix/l4re.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -250,11 +250,11 @@ pub mod net {
250250
unimpl!()
251251
}
252252

253-
pub fn set_multicast_hlim_v6(&self, _: u32) -> io::Result<()> {
253+
pub fn set_multicast_hop_limit_v6(&self, _: u32) -> io::Result<()> {
254254
unimpl!()
255255
}
256256

257-
pub fn multicast_hlim_v6(&self) -> io::Result<u32> {
257+
pub fn multicast_hop_limit_v6(&self) -> io::Result<u32> {
258258
unimpl!()
259259
}
260260

@@ -328,11 +328,11 @@ pub mod net {
328328
unimpl!()
329329
}
330330

331-
pub fn set_multicast_hlim_v6(&self, _: u32) -> io::Result<()> {
331+
pub fn set_multicast_hop_limit_v6(&self, _: u32) -> io::Result<()> {
332332
unimpl!()
333333
}
334334

335-
pub fn multicast_hlim_v6(&self) -> io::Result<u32> {
335+
pub fn multicast_hop_limit_v6(&self) -> io::Result<u32> {
336336
unimpl!()
337337
}
338338

@@ -486,11 +486,11 @@ pub mod net {
486486
unimpl!()
487487
}
488488

489-
pub fn set_multicast_hlim_v6(&self, _: u32) -> io::Result<()> {
489+
pub fn set_multicast_hop_limit_v6(&self, _: u32) -> io::Result<()> {
490490
unimpl!()
491491
}
492492

493-
pub fn multicast_hlim_v6(&self) -> io::Result<u32> {
493+
pub fn multicast_hop_limit_v6(&self) -> io::Result<u32> {
494494
unimpl!()
495495
}
496496

library/std/src/sys/unsupported/net.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -108,11 +108,11 @@ impl TcpStream {
108108
self.0
109109
}
110110

111-
pub fn set_multicast_hlim_v6(&self, _: u32) -> io::Result<()> {
111+
pub fn set_multicast_hop_limit_v6(&self, _: u32) -> io::Result<()> {
112112
self.0
113113
}
114114

115-
pub fn multicast_hlim_v6(&self) -> io::Result<u32> {
115+
pub fn multicast_hop_limit_v6(&self) -> io::Result<u32> {
116116
self.0
117117
}
118118

@@ -166,11 +166,11 @@ impl TcpListener {
166166
self.0
167167
}
168168

169-
pub fn set_multicast_hlim_v6(&self, _: u32) -> io::Result<()> {
169+
pub fn set_multicast_hop_limit_v6(&self, _: u32) -> io::Result<()> {
170170
self.0
171171
}
172172

173-
pub fn multicast_hlim_v6(&self) -> io::Result<u32> {
173+
pub fn multicast_hop_limit_v6(&self) -> io::Result<u32> {
174174
self.0
175175
}
176176

@@ -308,11 +308,11 @@ impl UdpSocket {
308308
self.0
309309
}
310310

311-
pub fn set_multicast_hlim_v6(&self, _: u32) -> io::Result<()> {
311+
pub fn set_multicast_hop_limit_v6(&self, _: u32) -> io::Result<()> {
312312
self.0
313313
}
314314

315-
pub fn multicast_hlim_v6(&self) -> io::Result<u32> {
315+
pub fn multicast_hop_limit_v6(&self) -> io::Result<u32> {
316316
self.0
317317
}
318318

library/std/src/sys/wasi/net.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -160,11 +160,11 @@ impl TcpStream {
160160
unsupported()
161161
}
162162

163-
pub fn set_multicast_hlim_v6(&self, _: u32) -> io::Result<()> {
163+
pub fn set_multicast_hop_limit_v6(&self, _: u32) -> io::Result<()> {
164164
unsupported()
165165
}
166166

167-
pub fn multicast_hlim_v6(&self) -> io::Result<u32> {
167+
pub fn multicast_hop_limit_v6(&self) -> io::Result<u32> {
168168
unsupported()
169169
}
170170

@@ -258,11 +258,11 @@ impl TcpListener {
258258
unsupported()
259259
}
260260

261-
pub fn set_multicast_hlim_v6(&self, _: u32) -> io::Result<()> {
261+
pub fn set_multicast_hop_limit_v6(&self, _: u32) -> io::Result<()> {
262262
unsupported()
263263
}
264264

265-
pub fn multicast_hlim_v6(&self) -> io::Result<u32> {
265+
pub fn multicast_hop_limit_v6(&self) -> io::Result<u32> {
266266
unsupported()
267267
}
268268

@@ -443,11 +443,11 @@ impl UdpSocket {
443443
unsupported()
444444
}
445445

446-
pub fn set_multicast_hlim_v6(&self, _: u32) -> io::Result<()> {
446+
pub fn set_multicast_hop_limit_v6(&self, _: u32) -> io::Result<()> {
447447
unsupported()
448448
}
449449

450-
pub fn multicast_hlim_v6(&self) -> io::Result<u32> {
450+
pub fn multicast_hop_limit_v6(&self) -> io::Result<u32> {
451451
unsupported()
452452
}
453453

library/std/src/sys_common/net.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -346,11 +346,11 @@ impl TcpStream {
346346
Ok(raw as u32)
347347
}
348348

349-
pub fn set_multicast_hlim_v6(&self, limit: u32) -> io::Result<()> {
349+
pub fn set_multicast_hop_limit_v6(&self, limit: u32) -> io::Result<()> {
350350
setsockopt(&self.inner, c::IPPROTO_IPV6, c::IPV6_MULTICAST_HOPS, limit as c_int)
351351
}
352352

353-
pub fn multicast_hlim_v6(&self) -> io::Result<u32> {
353+
pub fn multicast_hop_limit_v6(&self) -> io::Result<u32> {
354354
let raw: c_int = getsockopt(&self.inner, c::IPPROTO_IPV6, c::IPV6_MULTICAST_HOPS)?;
355355
Ok(raw as u32)
356356
}
@@ -464,11 +464,11 @@ impl TcpListener {
464464
Ok(raw as u32)
465465
}
466466

467-
pub fn set_multicast_hlim_v6(&self, limit: u32) -> io::Result<()> {
467+
pub fn set_multicast_hop_limit_v6(&self, limit: u32) -> io::Result<()> {
468468
setsockopt(&self.inner, c::IPPROTO_IPV6, c::IPV6_MULTICAST_HOPS, limit as c_int)
469469
}
470470

471-
pub fn multicast_hlim_v6(&self) -> io::Result<u32> {
471+
pub fn multicast_hop_limit_v6(&self) -> io::Result<u32> {
472472
let raw: c_int = getsockopt(&self.inner, c::IPPROTO_IPV6, c::IPV6_MULTICAST_HOPS)?;
473473
Ok(raw as u32)
474474
}
@@ -686,11 +686,11 @@ impl UdpSocket {
686686
Ok(raw as u32)
687687
}
688688

689-
pub fn set_multicast_hlim_v6(&self, limit: u32) -> io::Result<()> {
689+
pub fn set_multicast_hop_limit_v6(&self, limit: u32) -> io::Result<()> {
690690
setsockopt(&self.inner, c::IPPROTO_IPV6, c::IPV6_MULTICAST_HOPS, limit as c_int)
691691
}
692692

693-
pub fn multicast_hlim_v6(&self) -> io::Result<u32> {
693+
pub fn multicast_hop_limit_v6(&self) -> io::Result<u32> {
694694
let raw: c_int = getsockopt(&self.inner, c::IPPROTO_IPV6, c::IPV6_MULTICAST_HOPS)?;
695695
Ok(raw as u32)
696696
}

0 commit comments

Comments
 (0)