Skip to content

Commit 457fb51

Browse files
transports/tcp: Simplify IfWatcher integration (#2813)
With if-watch `2.0.0` `IfWatcher::new` is not async anymore, hence the `IfWatch` wrapping logic is obsolete. Co-authored-by: Thomas Eizinger <[email protected]>
1 parent c650dc1 commit 457fb51

File tree

8 files changed

+124
-267
lines changed

8 files changed

+124
-267
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@
4343

4444
# `libp2p` facade crate
4545

46+
# 0.49.0 - [unreleased]
47+
48+
- Update to [`libp2p-tcp` `v0.37.0`](transports/tcp/CHANGELOG.md#0370).
49+
4650
# 0.48.0
4751

4852
- Update to [`libp2p-core` `v0.36.0`](core/CHANGELOG.md#0360).

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name = "libp2p"
33
edition = "2021"
44
rust-version = "1.60.0"
55
description = "Peer-to-peer networking library"
6-
version = "0.48.0"
6+
version = "0.49.0"
77
authors = ["Parity Technologies <[email protected]>"]
88
license = "MIT"
99
repository = "https://github.com/libp2p/rust-libp2p"
@@ -110,7 +110,7 @@ smallvec = "1.6.1"
110110
libp2p-deflate = { version = "0.36.0", path = "transports/deflate", optional = true }
111111
libp2p-dns = { version = "0.36.0", path = "transports/dns", optional = true, default-features = false }
112112
libp2p-mdns = { version = "0.40.0", path = "protocols/mdns", optional = true, default-features = false }
113-
libp2p-tcp = { version = "0.36.0", path = "transports/tcp", default-features = false, optional = true }
113+
libp2p-tcp = { version = "0.37.0", path = "transports/tcp", default-features = false, optional = true }
114114
libp2p-websocket = { version = "0.38.0", path = "transports/websocket", optional = true }
115115

116116
[target.'cfg(not(target_os = "unknown"))'.dependencies]

transports/tcp/CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
# 0.37.0 - [unreleased]
2+
3+
- Update to `if-watch` `v2.0.0`. Simplify `IfWatcher` integration.
4+
Use `if_watch::IfWatcher` for all runtimes. See [PR 2813].
5+
6+
[PR 2813]: https://github.com/libp2p/rust-libp2p/pull/2813
7+
18
# 0.36.0
29

310
- Update to `libp2p-core` `v0.36.0`.

transports/tcp/Cargo.toml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name = "libp2p-tcp"
33
edition = "2021"
44
rust-version = "1.56.1"
55
description = "TCP/IP transport protocol for libp2p"
6-
version = "0.36.0"
6+
version = "0.37.0"
77
authors = ["Parity Technologies <[email protected]>"]
88
license = "MIT"
99
repository = "https://github.com/libp2p/rust-libp2p"
@@ -14,9 +14,7 @@ categories = ["network-programming", "asynchronous"]
1414
async-io-crate = { package = "async-io", version = "1.2.0", optional = true }
1515
futures = "0.3.8"
1616
futures-timer = "3.0"
17-
if-watch = { version = "1.1.1", optional = true }
18-
if-addrs = { version = "0.7.0", optional = true }
19-
ipnet = "2.0.0"
17+
if-watch = "2.0.0"
2018
libc = "0.2.80"
2119
libp2p-core = { version = "0.36.0", path = "../../core", default-features = false }
2220
log = "0.4.11"
@@ -25,10 +23,10 @@ tokio-crate = { package = "tokio", version = "1.19.0", default-features = false,
2523

2624
[features]
2725
default = ["async-io"]
28-
tokio = ["tokio-crate", "if-addrs"]
29-
async-io = ["async-io-crate", "if-watch"]
26+
tokio = ["tokio-crate"]
27+
async-io = ["async-io-crate"]
3028

3129
[dev-dependencies]
3230
async-std = { version = "1.6.5", features = ["attributes"] }
33-
tokio-crate = { package = "tokio", version = "1.0.1", default-features = false, features = ["net", "rt"] }
31+
tokio-crate = { package = "tokio", version = "1.0.1", default-features = false, features = ["net", "rt", "macros"] }
3432
env_logger = "0.9.0"

0 commit comments

Comments
 (0)