Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

core/muxing: Use total number of alive inbound streams for backpressure #2878

Closed
wants to merge 21 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
10861b9
Add tests
thomaseizinger Sep 8, 2022
dbd0e24
Track number of active inbound and outbound streams
thomaseizinger Sep 8, 2022
21ca446
Update changelog with PR number
thomaseizinger Sep 8, 2022
17f8139
Merge branch 'master' into track-alive-substreams
thomaseizinger Sep 22, 2022
f3e17b1
Make ctor module private
thomaseizinger Sep 22, 2022
63f16d1
Use total number of inbound streams for back-pressure
thomaseizinger Sep 22, 2022
9fba25f
Add changelog entry to swarm
thomaseizinger Sep 22, 2022
40ab076
Introduce `ConnectionHandler::max_inbound_streams`
thomaseizinger Sep 30, 2022
b679d8c
Merge branch 'master' into track-alive-substreams
thomaseizinger Sep 30, 2022
a008719
Don't override `max_inbound_streams` for `DummyConnectionHandler`
thomaseizinger Sep 30, 2022
9cd4083
Remove outdated rustdoc links
thomaseizinger Sep 30, 2022
e2b4969
protocols/{autonat,dcutr}: Fixing filename collision in examples (#2959)
plauche Sep 30, 2022
7e02538
Merge branch 'master' into track-alive-substreams
thomaseizinger Oct 6, 2022
311e674
Fix typo in log
thomaseizinger Oct 6, 2022
cbb6dd5
Use `max_inbound_streams` for kademlia handler
thomaseizinger Oct 6, 2022
534c3f6
Use `max_inbound_streams` in GossipSub handler
thomaseizinger Oct 6, 2022
a6bd2e4
Use `max_inbound_streams` for ping handler
thomaseizinger Oct 6, 2022
f921261
Merge branch 'master' into track-alive-substreams
thomaseizinger Oct 11, 2022
088301b
Merge branch 'master' into track-alive-substreams
thomaseizinger Oct 14, 2022
5531d96
Remove use of deprecated functions
thomaseizinger Oct 14, 2022
f3d36eb
Rewrite changelog section
thomaseizinger Oct 14, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions core/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,14 @@

- Deprecate `StreamMuxerExt::next_{inbound,outbound}`. See [PR 3002].

- Add `StreamMuxerBox::active_inbound_streams` and `StreamMuxerBox::active_outbound_streams`. See [PR 2878].

- Make `SubstreamBox::new` constructor module private. See [PR 2878].

[PR 2915]: https://github.com/libp2p/rust-libp2p/pull/2915
[PR 2918]: https://github.com/libp2p/rust-libp2p/pull/2918
[PR 3002]: https://github.com/libp2p/rust-libp2p/pull/3002
[PR 2878]: https://github.com/libp2p/rust-libp2p/pull/2878

# 0.36.0

Expand Down
7 changes: 7 additions & 0 deletions core/src/connection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
// DEALINGS IN THE SOFTWARE.

use crate::multiaddr::{Multiaddr, Protocol};
use std::fmt;

/// Connection identifier.
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq, PartialOrd, Ord)]
Expand All @@ -35,6 +36,12 @@ impl ConnectionId {
}
}

impl fmt::Display for ConnectionId {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
write!(f, "{}", self.0)
}
}

impl std::ops::Add<usize> for ConnectionId {
type Output = Self;

Expand Down
Loading