Skip to content

Commit 71cc9ab

Browse files
deps: update to socket2 v0.6 (#7443)
1 parent 02cbe45 commit 71cc9ab

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

tokio/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ mio = { version = "1.0.1", optional = true, default-features = false }
9696
parking_lot = { version = "0.12.0", optional = true }
9797

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

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

144144
[target.'cfg(not(target_family = "wasm"))'.dev-dependencies]
145-
socket2 = "0.5.5"
145+
socket2 = "0.6.0"
146146
tempfile = "3.1.0"
147147
proptest = "1"
148148

tokio/src/net/tcp/socket.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -450,7 +450,7 @@ impl TcpSocket {
450450
/// # }
451451
/// ```
452452
pub fn set_nodelay(&self, nodelay: bool) -> io::Result<()> {
453-
self.inner.set_nodelay(nodelay)
453+
self.inner.set_tcp_nodelay(nodelay)
454454
}
455455

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

478478
/// Gets the value of the `IP_TOS` option for this socket.
@@ -502,7 +502,7 @@ impl TcpSocket {
502502
))))
503503
)]
504504
pub fn tos(&self) -> io::Result<u32> {
505-
self.inner.tos()
505+
self.inner.tos_v4()
506506
}
507507

508508
/// Sets the value for the `IP_TOS` option on this socket.
@@ -531,7 +531,7 @@ impl TcpSocket {
531531
))))
532532
)]
533533
pub fn set_tos(&self, tos: u32) -> io::Result<()> {
534-
self.inner.set_tos(tos)
534+
self.inner.set_tos_v4(tos)
535535
}
536536

537537
/// Gets the value for the `SO_BINDTODEVICE` option on this socket

tokio/src/net/udp.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2028,7 +2028,7 @@ impl UdpSocket {
20282028
))))
20292029
)]
20302030
pub fn tos(&self) -> io::Result<u32> {
2031-
self.as_socket().tos()
2031+
self.as_socket().tos_v4()
20322032
}
20332033

20342034
/// Sets the value for the `IP_TOS` option on this socket.
@@ -2057,7 +2057,7 @@ impl UdpSocket {
20572057
))))
20582058
)]
20592059
pub fn set_tos(&self, tos: u32) -> io::Result<()> {
2060-
self.as_socket().set_tos(tos)
2060+
self.as_socket().set_tos_v4(tos)
20612061
}
20622062

20632063
/// Gets the value for the `SO_BINDTODEVICE` option on this socket

0 commit comments

Comments
 (0)