Fix concerns

This commit is contained in:
Pierre Krieger
2018-01-10 18:24:58 +01:00
parent c60fb982d2
commit 2783c5713e
4 changed files with 32 additions and 26 deletions

View File

@ -43,7 +43,7 @@
//! use libp2p_websocket::WsConfig;
//!
//! let ws_config = WsConfig::new();
//! // let _ = ws_config.dial(Multiaddr::new("/ip4/40.41.42.43/tcp/12345/ws").unwrap());
//! // let _ = ws_config.dial("/ip4/40.41.42.43/tcp/12345/ws".parse().unwrap());
//! ```
//!
//! # Other operating systems
@ -53,18 +53,23 @@
//!
//! This underlying transport must be passed to the `WsConfig::new()` function.
//!
//! ```ignore
//! ```
//! extern crate libp2p_swarm;
//! extern crate libp2p_tcp_transport;
//! extern crate libp2p_websocket;
//! extern crate tokio_core;
//!
//! use libp2p_websocket::WsConfig;
//! use libp2p_swarm::{Multiaddr, Transport};
//! use libp2p_tcp_transport::TcpConfig;
//! use libp2p_websocket::WsConfig;
//! use tokio_core::reactor::Core;
//!
//! # fn main() {
//! let core = Core::new().unwrap();
//! let ws_config = WsConfig::new(TcpConfig::new(core.handle()));
//! // let _ = ws_config.dial(Multiaddr::new("/ip4/40.41.42.43/tcp/12345/ws").unwrap());
//! # return;
//! let _ = ws_config.dial("/ip4/40.41.42.43/tcp/12345/ws".parse().unwrap());
//! # }
//! ```
//!