net: add docs on ConnectionRefused errors with udp sockets (#7870)

This commit is contained in:
Alice Ryhl
2026-04-11 20:06:08 +00:00
committed by GitHub
parent 203af02126
commit 81370e6202
2 changed files with 7 additions and 1 deletions
+2 -1
View File
@@ -1,4 +1,4 @@
316
317
&
+
<
@@ -139,6 +139,7 @@ hashmaps
HashMaps
hashsets
HdrHistogram
ICMP
ie
Illumos
impl
+5
View File
@@ -531,7 +531,12 @@ impl UdpSocket {
/// The [`connect`] method will connect this socket to a remote address.
/// This method will fail if the socket is not connected.
///
/// This method may fail with a [`ConnectionRefused`] error if the remote
/// address has replied with ICMP Unreachable to a previously sent packet.
/// However, this behavior depends on the OS.
///
/// [`connect`]: method@Self::connect
/// [`ConnectionRefused`]: std::io::ErrorKind::ConnectionRefused
///
/// # Return
///