deps: update to socket2 v0.6 (#7443)

This commit is contained in:
Thomas de Zeeuw 2025-07-07 13:45:30 +02:00 committed by GitHub
parent 02cbe4591b
commit 71cc9ab4c2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 8 additions and 8 deletions

View File

@ -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.
@ -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"

View File

@ -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.
@ -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.
@ -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.
@ -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

View File

@ -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.
@ -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