mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-06-28 17:21:34 +00:00
Fix concerns
This commit is contained in:
@ -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());
|
||||
//! # }
|
||||
//! ```
|
||||
//!
|
||||
|
||||
|
Reference in New Issue
Block a user