Skip to content

Commit

Permalink
Merge pull request #142 from thomaseizinger/poll-style
Browse files Browse the repository at this point in the history
Refactor `Connection` to a synchronous state machine
  • Loading branch information
thomaseizinger authored Nov 25, 2022
2 parents 2fcc567 + 63938b1 commit e59d8a5
Show file tree
Hide file tree
Showing 22 changed files with 1,197 additions and 1,027 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
# 0.11.0 [unreleased]

- Remove `Connection::control` in favor of `Control::new`.
Remove `Connection::next_stream` in favor of `Connection::poll_next_inbound`.
See [PR 142].

[PR 142]: https://github.com/libp2p/rust-yamux/pull/142

# 0.10.2

- Process command or socket result immediately and thereby no longer accessing
Expand Down
35 changes: 2 additions & 33 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,33 +1,2 @@
[package]
name = "yamux"
version = "0.10.2"
authors = ["Parity Technologies <[email protected]>"]
license = "Apache-2.0 OR MIT"
description = "Multiplexer over reliable, ordered connections"
keywords = ["network", "protocol"]
categories = ["network-programming"]
repository = "https://github.com/paritytech/yamux"
readme = "README.md"
edition = "2018"

[dependencies]
futures = { version = "0.3.12", default-features = false, features = ["std"] }
log = "0.4.8"
nohash-hasher = "0.2"
parking_lot = "0.12"
rand = "0.8.3"
static_assertions = "1"

[dev-dependencies]
anyhow = "1"
criterion = "0.4"
env_logger = "0.9"
futures = "0.3.4"
quickcheck = "1.0"
tokio = { version = "1.0", features = ["net", "rt-multi-thread", "macros", "time"] }
tokio-util = { version = "0.7", features = ["compat"] }
constrained-connection = "0.1"

[[bench]]
name = "concurrent"
harness = false
[workspace]
members = ["yamux", "test-harness"]
149 changes: 0 additions & 149 deletions src/connection/control.rs

This file was deleted.

99 changes: 0 additions & 99 deletions src/pause.rs

This file was deleted.

19 changes: 19 additions & 0 deletions test-harness/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
[package]
name = "test-harness"
version = "0.1.0"
edition = "2018"
publish = false

[dependencies]
yamux = { path = "../yamux" }
futures = "0.3.4"
quickcheck = "1.0"
tokio = { version = "1.0", features = ["net", "rt-multi-thread", "macros", "time"] }
tokio-util = { version = "0.7", features = ["compat"] }
anyhow = "1"
log = "0.4.17"

[dev-dependencies]
env_logger = "0.9"
constrained-connection = "0.1"

Loading

0 comments on commit e59d8a5

Please sign in to comment.