refactor!: Move ConnectionId and PendingPoint to libp2p-swarm (#3346)

Both of these are only needed as part of `libp2p-swarm`. Them residing in `libp2p-core` is a left-over from when `libp2p-core` still contained `Pool`.
This commit is contained in:
Thomas Eizinger
2023-01-18 19:56:32 +11:00
committed by GitHub
parent db2cd43826
commit 475dc80a07
34 changed files with 132 additions and 133 deletions

View File

@ -22,11 +22,12 @@
use crate::handler;
use either::Either;
use libp2p_core::connection::{ConnectedPoint, ConnectionId};
use libp2p_core::connection::ConnectedPoint;
use libp2p_core::multiaddr::Protocol;
use libp2p_core::{Multiaddr, PeerId};
use libp2p_swarm::behaviour::{ConnectionClosed, ConnectionEstablished, DialFailure, FromSwarm};
use libp2p_swarm::dial_opts::{self, DialOpts};
use libp2p_swarm::ConnectionId;
use libp2p_swarm::{
ConnectionHandler, ConnectionHandlerUpgrErr, ExternalAddresses, IntoConnectionHandler,
NetworkBehaviour, NetworkBehaviourAction, NotifyHandler, PollParameters,

View File

@ -20,12 +20,11 @@
use crate::protocol;
use either::Either;
use libp2p_core::connection::ConnectionId;
use libp2p_core::upgrade::DeniedUpgrade;
use libp2p_core::{ConnectedPoint, PeerId};
use libp2p_swarm::dummy;
use libp2p_swarm::handler::SendWrapper;
use libp2p_swarm::{ConnectionHandler, IntoConnectionHandler};
use libp2p_swarm::{ConnectionHandler, ConnectionId, IntoConnectionHandler};
pub mod direct;
pub mod relayed;

View File

@ -20,11 +20,10 @@
//! [`ConnectionHandler`] handling direct connection upgraded through a relayed connection.
use libp2p_core::connection::ConnectionId;
use libp2p_core::upgrade::DeniedUpgrade;
use libp2p_swarm::handler::ConnectionEvent;
use libp2p_swarm::{
ConnectionHandler, ConnectionHandlerEvent, ConnectionHandlerUpgrErr, KeepAlive,
ConnectionHandler, ConnectionHandlerEvent, ConnectionHandlerUpgrErr, ConnectionId, KeepAlive,
SubstreamProtocol,
};
use std::task::{Context, Poll};