Skip to content

Commit

Permalink
feat(tcp): make TCP_NODELAY the default
Browse files Browse the repository at this point in the history
Superseeds libp2p#4916.
Fixes: libp2p#4890.

Pull-Request: libp2p#5469.
  • Loading branch information
jxs authored and TimTinkers committed Sep 14, 2024
1 parent 421941f commit 4acbd80
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 13 deletions.
18 changes: 9 additions & 9 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ libp2p-stream = { version = "0.1.0-alpha.1", path = "protocols/stream" }
libp2p-swarm = { version = "0.45.0", path = "swarm" }
libp2p-swarm-derive = { version = "=0.34.2", path = "swarm-derive" } # `libp2p-swarm-derive` may not be compatible with different `libp2p-swarm` non-breaking releases. E.g. `libp2p-swarm` might introduce a new enum variant `FromSwarm` (which is `#[non-exhaustive]`) in a non-breaking release. Older versions of `libp2p-swarm-derive` would not forward this enum variant within the `NetworkBehaviour` hierarchy. Thus the version pinning is required.
libp2p-swarm-test = { version = "0.3.0", path = "swarm-test" }
libp2p-tcp = { version = "0.41.1", path = "transports/tcp" }
libp2p-tcp = { version = "0.42.0", path = "transports/tcp" }
libp2p-tls = { version = "0.4.0", path = "transports/tls" }
libp2p-uds = { version = "0.40.0", path = "transports/uds" }
libp2p-upnp = { version = "0.2.2", path = "protocols/upnp" }
Expand Down
4 changes: 3 additions & 1 deletion transports/tcp/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
## 0.41.1
## 0.42.0

- Disable Nagle's algorithm (i.e. `TCP_NODELAY`) by default.
See [PR 4916](https://github.com/libp2p/rust-libp2p/pull/4916)

## 0.41.0

Expand Down
2 changes: 1 addition & 1 deletion transports/tcp/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "libp2p-tcp"
edition = "2021"
rust-version = { workspace = true }
description = "TCP/IP transport protocol for libp2p"
version = "0.41.1"
version = "0.42.0"
authors = ["Parity Technologies <admin@parity.io>"]
license = "MIT"
repository = "https://github.com/libp2p/rust-libp2p"
Expand Down
2 changes: 1 addition & 1 deletion transports/tcp/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ impl Config {
pub fn new() -> Self {
Self {
ttl: None,
nodelay: None,
nodelay: Some(false), // Disable Nagle's algorithm by default
backlog: 1024,
enable_port_reuse: false,
}
Expand Down

0 comments on commit 4acbd80

Please sign in to comment.