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,swarm}/: Don't require Transport: Clone and take &mut #2529

Merged
merged 17 commits into from
Apr 6, 2022
Merged
Changes from 1 commit
Commits
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
Prev Previous commit
Next Next commit
transports/tcp: Remove outdated comment
mxinden committed Apr 6, 2022
commit 13c1b61161e9e801ab12cadce17cd16c4a625c23
9 changes: 2 additions & 7 deletions transports/tcp/src/lib.rs
Original file line number Diff line number Diff line change
@@ -66,11 +66,6 @@ use std::{
use provider::{IfEvent, Provider};

/// The configuration for a TCP/IP transport capability for libp2p.
///
/// A [`GenTcpConfig`] implements the [`Transport`] interface and thus
/// is consumed on [`Transport::listen_on`] and [`Transport::dial`].
/// However, the config can be cheaply cloned to perform multiple such
/// operations with the same config.
#[derive(Clone, Debug)]
pub struct GenTcpConfig<T> {
/// The type of the I/O provider.
@@ -232,9 +227,9 @@ where
/// > a single outgoing connection to a particular address and port
/// > of a peer per local listening socket address.
///
/// Two `GenTcpConfig`s keep track of the listen socket addresses as they
/// `GenTcpConfig` keeps track of the listen socket addresses as they
/// are reported by polling [`TcpListenStream`]s obtained from
/// [`GenTcpConfig::listen_on()`]. It is thus possible to listen on multiple
/// [`GenTcpConfig::listen_on()`]. It is possible to listen on multiple
/// addresses, enabling port reuse for each, knowing exactly which listen
/// address is reused when dialing with a specific `GenTcpConfig`, as in the
/// following example: