mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-08-01 01:11:58 +00:00
Move swarm and protocols handler into swarm crate. (#1188)
Move swarm and protocols handler into swarm crate.
This commit is contained in:
@@ -13,6 +13,7 @@ categories = ["network-programming", "asynchronous"]
|
||||
arrayvec = "0.4"
|
||||
bytes = "0.4"
|
||||
libp2p-core = { version = "0.10.0", path = "../../core" }
|
||||
libp2p-swarm = { version = "0.1.0", path = "../../swarm" }
|
||||
log = "0.4.1"
|
||||
multiaddr = { package = "parity-multiaddr", version = "0.5.0", path = "../../misc/multiaddr" }
|
||||
futures = "0.1"
|
||||
|
@@ -20,12 +20,12 @@
|
||||
|
||||
use crate::protocol;
|
||||
use futures::prelude::*;
|
||||
use libp2p_core::ProtocolsHandlerEvent;
|
||||
use libp2p_core::protocols_handler::{
|
||||
use libp2p_swarm::{
|
||||
KeepAlive,
|
||||
SubstreamProtocol,
|
||||
ProtocolsHandler,
|
||||
ProtocolsHandlerUpgrErr,
|
||||
ProtocolsHandlerEvent
|
||||
};
|
||||
use std::{error::Error, io, fmt, num::NonZeroU32, time::Duration};
|
||||
use std::collections::VecDeque;
|
||||
|
@@ -48,8 +48,8 @@ pub use handler::{PingConfig, PingResult, PingSuccess, PingFailure};
|
||||
use handler::PingHandler;
|
||||
|
||||
use futures::prelude::*;
|
||||
use libp2p_core::swarm::{ConnectedPoint, NetworkBehaviour, NetworkBehaviourAction, PollParameters};
|
||||
use libp2p_core::{Multiaddr, PeerId};
|
||||
use libp2p_core::{ConnectedPoint, Multiaddr, PeerId};
|
||||
use libp2p_swarm::{NetworkBehaviour, NetworkBehaviourAction, PollParameters};
|
||||
use std::collections::VecDeque;
|
||||
use std::marker::PhantomData;
|
||||
use tokio_io::{AsyncRead, AsyncWrite};
|
||||
|
@@ -23,7 +23,6 @@
|
||||
use libp2p_core::{
|
||||
Multiaddr,
|
||||
PeerId,
|
||||
Swarm,
|
||||
identity,
|
||||
muxing::StreamMuxer,
|
||||
upgrade::{self, OutboundUpgradeExt, InboundUpgradeExt},
|
||||
@@ -32,6 +31,7 @@ use libp2p_core::{
|
||||
use libp2p_ping::*;
|
||||
use libp2p_yamux as yamux;
|
||||
use libp2p_secio::SecioConfig;
|
||||
use libp2p_swarm::Swarm;
|
||||
use libp2p_tcp::TcpConfig;
|
||||
use futures::{future, prelude::*};
|
||||
use std::{fmt, io, time::Duration, sync::mpsc::sync_channel};
|
||||
|
Reference in New Issue
Block a user