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

Rename libp2p-tcp-transport to libp2p-tcp #762

Merged
merged 1 commit into from
Dec 10, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ tokio-io = "0.1"
[target.'cfg(not(target_os = "emscripten"))'.dependencies]
libp2p-dns = { path = "./transports/dns" }
libp2p-mdns = { path = "./misc/mdns" }
libp2p-tcp-transport = { path = "./transports/tcp" }
libp2p-tcp = { path = "./transports/tcp" }

[target.'cfg(target_os = "emscripten")'.dependencies]
stdweb = { version = "0.1.3", default-features = false }
Expand Down
2 changes: 1 addition & 1 deletion core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ void = "1"

[dev-dependencies]
libp2p-ping = { path = "../protocols/ping" }
libp2p-tcp-transport = { path = "../transports/tcp" }
libp2p-tcp = { path = "../transports/tcp" }
libp2p-mplex = { path = "../muxers/mplex" }
rand = "0.6"
tokio = "0.1"
Expand Down
6 changes: 3 additions & 3 deletions core/src/nodes/listeners.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,13 @@ use std::collections::VecDeque;
/// ```no_run
/// # extern crate futures;
/// # extern crate libp2p_core;
/// # extern crate libp2p_tcp_transport;
/// # extern crate libp2p_tcp;
/// # extern crate tokio;
/// # fn main() {
/// use futures::prelude::*;
/// use libp2p_core::nodes::listeners::{ListenersEvent, ListenersStream};
///
/// let mut listeners = ListenersStream::new(libp2p_tcp_transport::TcpConfig::new());
/// let mut listeners = ListenersStream::new(libp2p_tcp::TcpConfig::new());
///
/// // Ask the `listeners` to start listening on the given multiaddress.
/// listeners.listen_on("/ip4/0.0.0.0/tcp/0".parse().unwrap()).unwrap();
Expand Down Expand Up @@ -274,7 +274,7 @@ where

#[cfg(test)]
mod tests {
extern crate libp2p_tcp_transport;
extern crate libp2p_tcp;

use super::*;
use transport;
Expand Down
2 changes: 1 addition & 1 deletion muxers/mplex/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ tokio-io = "0.1"
unsigned-varint = { version = "0.2.1", features = ["codec"] }

[dev-dependencies]
libp2p-tcp-transport = { path = "../../transports/tcp" }
libp2p-tcp = { path = "../../transports/tcp" }
tokio = "0.1"
2 changes: 1 addition & 1 deletion muxers/mplex/tests/two_peers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ extern crate bytes;
extern crate futures;
extern crate libp2p_mplex as multiplex;
extern crate libp2p_core as swarm;
extern crate libp2p_tcp_transport as tcp;
extern crate libp2p_tcp as tcp;
extern crate tokio;

use futures::prelude::*;
Expand Down
2 changes: 1 addition & 1 deletion protocols/identify/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@ unsigned-varint = { version = "0.2.1", features = ["codec"] }
void = "1.0"

[dev-dependencies]
libp2p-tcp-transport = { path = "../../transports/tcp" }
libp2p-tcp = { path = "../../transports/tcp" }
tokio = "0.1"
4 changes: 2 additions & 2 deletions protocols/identify/src/protocol.rs
Original file line number Diff line number Diff line change
Expand Up @@ -253,12 +253,12 @@ fn parse_proto_msg(msg: BytesMut) -> Result<(IdentifyInfo, Multiaddr), IoError>

#[cfg(test)]
mod tests {
extern crate libp2p_tcp_transport;
extern crate libp2p_tcp;
extern crate tokio;

use crate::protocol::{IdentifyInfo, RemoteInfo, IdentifyProtocolConfig};
use self::tokio::runtime::current_thread::Runtime;
use self::libp2p_tcp_transport::TcpConfig;
use self::libp2p_tcp::TcpConfig;
use futures::{Future, Stream};
use libp2p_core::{PublicKey, Transport, upgrade::{apply_outbound, apply_inbound}};
use std::sync::mpsc;
Expand Down
2 changes: 1 addition & 1 deletion protocols/kad/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@ unsigned-varint = { version = "0.2.1", features = ["codec"] }
void = "1.0"

[dev-dependencies]
libp2p-tcp-transport = { path = "../../transports/tcp" }
libp2p-tcp = { path = "../../transports/tcp" }
tokio = "0.1"
4 changes: 2 additions & 2 deletions protocols/kad/src/protocol.rs
Original file line number Diff line number Diff line change
Expand Up @@ -455,11 +455,11 @@ fn proto_to_resp_msg(

#[cfg(test)]
mod tests {
extern crate libp2p_tcp_transport;
extern crate libp2p_tcp;
extern crate tokio;

/*// TODO: restore
use self::libp2p_tcp_transport::TcpConfig;
use self::libp2p_tcp::TcpConfig;
use self::tokio::runtime::current_thread::Runtime;
use futures::{Future, Sink, Stream};
use libp2p_core::{PeerId, PublicKey, Transport};
Expand Down
2 changes: 1 addition & 1 deletion protocols/ping/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ tokio-timer = "0.2.6"
void = "1.0"

[dev-dependencies]
libp2p-tcp-transport = { path = "../../transports/tcp" }
libp2p-tcp = { path = "../../transports/tcp" }
tokio = "0.1"
tokio-tcp = "0.1"
4 changes: 2 additions & 2 deletions protocols/ping/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
//! extern crate futures;
//! extern crate libp2p_ping;
//! extern crate libp2p_core;
//! extern crate libp2p_tcp_transport;
//! extern crate libp2p_tcp;
//! extern crate tokio;
//!
//! use futures::{Future, Stream};
Expand All @@ -61,7 +61,7 @@
//! use tokio::runtime::current_thread::Runtime;
//!
//! # fn main() {
//! let ping_dialer = libp2p_tcp_transport::TcpConfig::new()
//! let ping_dialer = libp2p_tcp::TcpConfig::new()
//! .and_then(|socket, _| {
//! apply_outbound(socket, Ping::default()).map_err(|e| e.into_io_error())
//! })
Expand Down
2 changes: 1 addition & 1 deletion protocols/secio/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,6 @@ rsa = ["ring/rsa_signing"]
aes-all = ["aesni", "lazy_static"]

[dev-dependencies]
libp2p-tcp-transport = { path = "../../transports/tcp" }
libp2p-tcp = { path = "../../transports/tcp" }
tokio = "0.1"
tokio-tcp = "0.1"
4 changes: 2 additions & 2 deletions protocols/secio/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@
//! extern crate tokio_io;
//! extern crate libp2p_core;
//! extern crate libp2p_secio;
//! extern crate libp2p_tcp_transport;
//! extern crate libp2p_tcp;
//!
//! # fn main() {
//! use futures::Future;
//! use libp2p_secio::{SecioConfig, SecioKeyPair, SecioOutput};
//! use libp2p_core::{Multiaddr, upgrade::apply_inbound};
//! use libp2p_core::transport::Transport;
//! use libp2p_tcp_transport::TcpConfig;
//! use libp2p_tcp::TcpConfig;
//! use tokio_io::io::write_all;
//! use tokio::runtime::current_thread::Runtime;
//!
Expand Down
10 changes: 5 additions & 5 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@
//!
//! ```rust
//! use libp2p::{Multiaddr, Transport, tcp::TcpConfig};
//! let tcp_transport = TcpConfig::new();
//! let tcp = TcpConfig::new();
//! let addr: Multiaddr = "/ip4/98.97.96.95/tcp/20500".parse().expect("invalid multiaddr");
//! let _outgoing_connec = tcp_transport.dial(addr);
//! let _outgoing_connec = tcp.dial(addr);
//! // Note that `_outgoing_connec` is a `Future`, and therefore doesn't do anything by itself
//! // unless it is run through a tokio runtime.
//! ```
Expand Down Expand Up @@ -77,9 +77,9 @@
//! ```rust
//! # #[cfg(all(not(target_os = "emscripten"), feature = "libp2p-secio"))] {
//! use libp2p::{Transport, tcp::TcpConfig, secio::{SecioConfig, SecioKeyPair}};
//! let tcp_transport = TcpConfig::new();
//! let tcp = TcpConfig::new();
//! let secio_upgrade = SecioConfig::new(SecioKeyPair::ed25519_generated().unwrap());
//! let with_security = tcp_transport.with_upgrade(secio_upgrade);
//! let with_security = tcp.with_upgrade(secio_upgrade);
//! // let _ = with_security.dial(...);
//! // `with_security` also implements the `Transport` trait, and all the connections opened
//! // through it will automatically negotiate the `secio` protocol.
Expand Down Expand Up @@ -153,7 +153,7 @@ pub extern crate libp2p_plaintext as plaintext;
pub extern crate libp2p_ratelimit as ratelimit;
pub extern crate libp2p_secio as secio;
#[cfg(not(target_os = "emscripten"))]
pub extern crate libp2p_tcp_transport as tcp;
pub extern crate libp2p_tcp as tcp;
pub extern crate libp2p_transport_timeout as transport_timeout;
pub extern crate libp2p_uds as uds;
#[cfg(feature = "libp2p-websocket")]
Expand Down
2 changes: 1 addition & 1 deletion transports/dns/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ tokio-dns-unofficial = "0.4"
tokio-io = "0.1"

[dev-dependencies]
libp2p-tcp-transport = { path = "../../transports/tcp" }
libp2p-tcp = { path = "../../transports/tcp" }
tokio = "0.1"
4 changes: 2 additions & 2 deletions transports/dns/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -279,8 +279,8 @@ where

#[cfg(test)]
mod tests {
extern crate libp2p_tcp_transport;
use self::libp2p_tcp_transport::TcpConfig;
extern crate libp2p_tcp;
use self::libp2p_tcp::TcpConfig;
use futures::future;
use swarm::Transport;
use multiaddr::{Protocol, Multiaddr};
Expand Down
2 changes: 1 addition & 1 deletion transports/tcp/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "libp2p-tcp-transport"
name = "libp2p-tcp"
description = "TCP/IP transport protocol for libp2p"
version = "0.1.0"
authors = ["Parity Technologies <admin@parity.io>"]
Expand Down
4 changes: 2 additions & 2 deletions transports/tcp/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
//! Example:
//!
//! ```
//! extern crate libp2p_tcp_transport;
//! use libp2p_tcp_transport::TcpConfig;
//! extern crate libp2p_tcp;
//! use libp2p_tcp::TcpConfig;
//!
//! # fn main() {
//! let tcp = TcpConfig::new();
Expand Down
2 changes: 1 addition & 1 deletion transports/websocket/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@ websocket = { version = "0.21.0", default-features = false, features = ["async",
stdweb = { version = "0.1.3", default-features = false }

[target.'cfg(not(target_os = "emscripten"))'.dev-dependencies]
libp2p-tcp-transport = { path = "../tcp" }
libp2p-tcp = { path = "../tcp" }
tokio = "0.1"
2 changes: 1 addition & 1 deletion transports/websocket/src/desktop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ fn client_addr_to_ws(client_addr: &Multiaddr, is_wss: bool) -> String {

#[cfg(test)]
mod tests {
extern crate libp2p_tcp_transport as tcp;
extern crate libp2p_tcp as tcp;
extern crate tokio;
use self::tokio::runtime::current_thread::Runtime;
use futures::{Future, Stream};
Expand Down
4 changes: 2 additions & 2 deletions transports/websocket/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,11 @@
//!
//! ```
//! extern crate libp2p_core;
//! extern crate libp2p_tcp_transport;
//! extern crate libp2p_tcp;
//! extern crate libp2p_websocket;
//!
//! use libp2p_core::{Multiaddr, Transport};
//! use libp2p_tcp_transport::TcpConfig;
//! use libp2p_tcp::TcpConfig;
//! use libp2p_websocket::WsConfig;
//!
//! # fn main() {
Expand Down