Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions tokio/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ mio = { version = "1.0.1", optional = true, default-features = false }
parking_lot = { version = "0.12.0", optional = true }

[target.'cfg(not(target_family = "wasm"))'.dependencies]
socket2 = { version = "0.5.5", optional = true, features = ["all"] }
socket2 = { version = "0.6.0", optional = true, features = ["all"] }

# Currently unstable. The API exposed by these features may be broken at any time.
# Requires `--cfg tokio_unstable` to enable.
Expand Down Expand Up @@ -142,7 +142,7 @@ async-stream = "0.3"
futures-concurrency = "7.6.3"

[target.'cfg(not(target_family = "wasm"))'.dev-dependencies]
socket2 = "0.5.5"
socket2 = "0.6.0"
tempfile = "3.1.0"
proptest = "1"

Expand Down
8 changes: 4 additions & 4 deletions tokio/src/net/tcp/socket.rs
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@ impl TcpSocket {
/// # }
/// ```
pub fn set_nodelay(&self, nodelay: bool) -> io::Result<()> {
self.inner.set_nodelay(nodelay)
self.inner.set_tcp_nodelay(nodelay)
}

/// Gets the value of the `TCP_NODELAY` option on this socket.
Expand All @@ -472,7 +472,7 @@ impl TcpSocket {
/// # }
/// ```
pub fn nodelay(&self) -> io::Result<bool> {
self.inner.nodelay()
self.inner.tcp_nodelay()
}

/// Gets the value of the `IP_TOS` option for this socket.
Expand Down Expand Up @@ -502,7 +502,7 @@ impl TcpSocket {
))))
)]
pub fn tos(&self) -> io::Result<u32> {
self.inner.tos()
self.inner.tos_v4()
}

/// Sets the value for the `IP_TOS` option on this socket.
Expand Down Expand Up @@ -531,7 +531,7 @@ impl TcpSocket {
))))
)]
pub fn set_tos(&self, tos: u32) -> io::Result<()> {
self.inner.set_tos(tos)
self.inner.set_tos_v4(tos)
}

/// Gets the value for the `SO_BINDTODEVICE` option on this socket
Expand Down
4 changes: 2 additions & 2 deletions tokio/src/net/udp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2028,7 +2028,7 @@ impl UdpSocket {
))))
)]
pub fn tos(&self) -> io::Result<u32> {
self.as_socket().tos()
self.as_socket().tos_v4()
}

/// Sets the value for the `IP_TOS` option on this socket.
Expand Down Expand Up @@ -2057,7 +2057,7 @@ impl UdpSocket {
))))
)]
pub fn set_tos(&self, tos: u32) -> io::Result<()> {
self.as_socket().set_tos(tos)
self.as_socket().set_tos_v4(tos)
}

/// Gets the value for the `SO_BINDTODEVICE` option on this socket
Expand Down
Loading