mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-17 05:25:37 +03:00
Rollup merge of #41499 - steveklabnik:gh25164, r=alexcrichton
Address platform-specific behavior in TcpStream::shutdown Fixes #25164 r? @rust-lang/libs from the GitHub thread, it seems like documenting this behavior is okay, but I want to make sure that's what you want.
This commit is contained in:
@@ -177,6 +177,13 @@ pub fn local_addr(&self) -> io::Result<SocketAddr> {
|
||||
///
|
||||
/// [`Shutdown`]: ../../std/net/enum.Shutdown.html
|
||||
///
|
||||
/// # Platform-specific behavior
|
||||
///
|
||||
/// Calling this function multiple times may result in different behavior,
|
||||
/// depending on the operating system. On Linux, the second call will
|
||||
/// return `Ok(())`, but on macOS, it will return `ErrorKind::NotConnected`.
|
||||
/// This may change in the future.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// ```no_run
|
||||
|
||||
Reference in New Issue
Block a user