mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-06-22 06:11:34 +00:00
Fix concerns
This commit is contained in:
@ -28,7 +28,7 @@ extern crate tokio_io;
|
||||
|
||||
use bytes::BytesMut;
|
||||
use futures::{Stream, Sink, Future};
|
||||
use swarm::Transport;
|
||||
use swarm::{Transport, SimpleProtocol};
|
||||
use tcp::TcpConfig;
|
||||
use tokio_core::reactor::Core;
|
||||
use tokio_io::codec::length_delimited;
|
||||
@ -47,9 +47,9 @@ fn main() {
|
||||
}
|
||||
});
|
||||
|
||||
let with_echo = with_secio.with_simple_protocol_upgrade("/echo/1.0.0", |socket| {
|
||||
let with_echo = with_secio.with_upgrade(SimpleProtocol::new("/echo/1.0.0", |socket| {
|
||||
Ok(length_delimited::Framed::<_, BytesMut>::new(socket))
|
||||
});
|
||||
}));
|
||||
|
||||
let dialer = with_echo.dial(swarm::multiaddr::Multiaddr::new("/ip4/127.0.0.1/tcp/10333").unwrap())
|
||||
.unwrap_or_else(|_| panic!())
|
||||
|
Reference in New Issue
Block a user