Skip to content

Commit be1d579

Browse files
committed
Mention that timeout accessors aren't always available
1 parent 8b758a3 commit be1d579

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/libstd/net/tcp.rs

+8
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,10 @@ impl TcpStream {
164164
/// Returns the read timeout of this socket.
165165
///
166166
/// If the timeout is `None`, then `read` calls will block indefinitely.
167+
///
168+
/// # Note
169+
///
170+
/// Some platforms do not provide access to the current timeout.
167171
#[unstable(feature = "socket_timeout", reason = "RFC 1047 - recently added")]
168172
pub fn read_timeout(&self) -> io::Result<Option<Duration>> {
169173
self.0.read_timeout()
@@ -172,6 +176,10 @@ impl TcpStream {
172176
/// Returns the write timeout of this socket.
173177
///
174178
/// If the timeout is `None`, then `write` calls will block indefinitely.
179+
///
180+
/// # Note
181+
///
182+
/// Some platforms do not provide access to the current timeout.
175183
#[unstable(feature = "socket_timeout", reason = "RFC 1047 - recently added")]
176184
pub fn write_timeout(&self) -> io::Result<Option<Duration>> {
177185
self.0.write_timeout()

0 commit comments

Comments
 (0)