mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-05-21 15:11:20 +00:00
TCP transport
Implementation of the libp2p Transport
trait for TCP/IP.
Uses the tokio library.
Usage
Example:
extern crate libp2p_tcp_transport;
extern crate tokio_current_thread;
use libp2p_tcp_transport::TcpConfig;
use tokio_core::reactor::Core;
let mut core = Core::new().unwrap();
let tcp = TcpConfig::new();
The TcpConfig
structs implements the Transport
trait of the swarm
library. See the
documentation of swarm
and of libp2p in general to learn how to use the Transport
trait.