Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 1666f86

Browse files
committedAug 15, 2024··
proposal to expand (a subset of) linux specific socket capabilities.
to stabilise the quickack part for now, tcp_deferaccept had been added at a later stage.
1 parent 026e9ed commit 1666f86

File tree

4 files changed

+8
-10
lines changed

4 files changed

+8
-10
lines changed
 

‎library/std/src/os/android/net.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@
66
pub use crate::os::net::linux_ext::addr::SocketAddrExt;
77
#[unstable(feature = "unix_socket_ancillary_data", issue = "76915")]
88
pub use crate::os::net::linux_ext::socket::UnixSocketExt;
9-
#[unstable(feature = "tcp_quickack", issue = "96256")]
9+
#[stable(feature = "tcp_quickack", since = "CURRENT_RUSTC_VERSION")]
1010
pub use crate::os::net::linux_ext::tcp::TcpStreamExt;

‎library/std/src/os/linux/net.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@
66
pub use crate::os::net::linux_ext::addr::SocketAddrExt;
77
#[unstable(feature = "unix_socket_ancillary_data", issue = "76915")]
88
pub use crate::os::net::linux_ext::socket::UnixSocketExt;
9-
#[unstable(feature = "tcp_quickack", issue = "96256")]
9+
#[stable(feature = "tcp_quickack", since = "CURRENT_RUSTC_VERSION")]
1010
pub use crate::os::net::linux_ext::tcp::TcpStreamExt;

‎library/std/src/os/net/linux_ext/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ pub(crate) mod addr;
88
#[unstable(feature = "unix_socket_ancillary_data", issue = "76915")]
99
pub(crate) mod socket;
1010

11-
#[unstable(feature = "tcp_quickack", issue = "96256")]
11+
#[stable(feature = "tcp_quickack", since = "CURRENT_RUSTC_VERSION")]
1212
pub(crate) mod tcp;
1313

1414
#[cfg(test)]

‎library/std/src/os/net/linux_ext/tcp.rs

+5-7
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ use crate::{io, net};
99
/// Os-specific extensions for [`TcpStream`]
1010
///
1111
/// [`TcpStream`]: net::TcpStream
12-
#[unstable(feature = "tcp_quickack", issue = "96256")]
12+
#[stable(feature = "tcp_quickack", since = "CURRENT_RUSTC_VERSION")]
1313
pub trait TcpStreamExt: Sealed {
1414
/// Enable or disable `TCP_QUICKACK`.
1515
///
@@ -23,15 +23,14 @@ pub trait TcpStreamExt: Sealed {
2323
/// # Examples
2424
///
2525
/// ```no_run
26-
/// #![feature(tcp_quickack)]
2726
/// use std::net::TcpStream;
2827
/// use std::os::linux::net::TcpStreamExt;
2928
///
3029
/// let stream = TcpStream::connect("127.0.0.1:8080")
3130
/// .expect("Couldn't connect to the server...");
3231
/// stream.set_quickack(true).expect("set_quickack call failed");
3332
/// ```
34-
#[unstable(feature = "tcp_quickack", issue = "96256")]
33+
#[stable(feature = "tcp_quickack", since = "CURRENT_RUSTC_VERSION")]
3534
fn set_quickack(&self, quickack: bool) -> io::Result<()>;
3635

3736
/// Gets the value of the `TCP_QUICKACK` option on this socket.
@@ -41,7 +40,6 @@ pub trait TcpStreamExt: Sealed {
4140
/// # Examples
4241
///
4342
/// ```no_run
44-
/// #![feature(tcp_quickack)]
4543
/// use std::net::TcpStream;
4644
/// use std::os::linux::net::TcpStreamExt;
4745
///
@@ -50,7 +48,7 @@ pub trait TcpStreamExt: Sealed {
5048
/// stream.set_quickack(true).expect("set_quickack call failed");
5149
/// assert_eq!(stream.quickack().unwrap_or(false), true);
5250
/// ```
53-
#[unstable(feature = "tcp_quickack", issue = "96256")]
51+
#[stable(feature = "tcp_quickack", since = "CURRENT_RUSTC_VERSION")]
5452
fn quickack(&self) -> io::Result<bool>;
5553

5654
/// A socket listener will be awakened solely when data arrives.
@@ -99,10 +97,10 @@ pub trait TcpStreamExt: Sealed {
9997
fn deferaccept(&self) -> io::Result<u32>;
10098
}
10199

102-
#[unstable(feature = "tcp_quickack", issue = "96256")]
100+
#[stable(feature = "tcp_quickack", since = "CURRENT_RUSTC_VERSION")]
103101
impl Sealed for net::TcpStream {}
104102

105-
#[unstable(feature = "tcp_quickack", issue = "96256")]
103+
#[stable(feature = "tcp_quickack", since = "CURRENT_RUSTC_VERSION")]
106104
impl TcpStreamExt for net::TcpStream {
107105
fn set_quickack(&self, quickack: bool) -> io::Result<()> {
108106
self.as_inner().as_inner().set_quickack(quickack)

0 commit comments

Comments
 (0)
Please sign in to comment.