summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorCarl Lerche <me@carllerche.com>2018-02-07 10:42:27 -0800
committerGitHub <noreply@github.com>2018-02-07 10:42:27 -0800
commitc30fa62ddafa3fdf9a2af96ed2d2c6a20397e7c2 (patch)
treee9b91123689e34807147b89d456d9a6474436549 /tests
parentad8338e4da63f659acce89284381d08a2474f85b (diff)
Remove `framed` fn from `UdpSocket` (#116)
Instead, use `UdpFramed::new` to create a framed wrapper around the UDP socket.
Diffstat (limited to 'tests')
-rw-r--r--tests/udp.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/udp.rs b/tests/udp.rs
index 37c98698..162af700 100644
--- a/tests/udp.rs
+++ b/tests/udp.rs
@@ -10,7 +10,7 @@ use std::net::SocketAddr;
use futures::{Future, Poll, Stream, Sink};
-use tokio::net::UdpSocket;
+use tokio::net::{UdpSocket, UdpFramed};
use tokio_io::codec::{Encoder, Decoder};
use bytes::{BytesMut, BufMut};
@@ -225,8 +225,8 @@ fn send_framed() {
let b_addr = t!(b_soc.local_addr());
{
- let a = a_soc.framed(ByteCodec);
- let b = b_soc.framed(ByteCodec);
+ let a = UdpFramed::new(a_soc, ByteCodec);
+ let b = UdpFramed::new(b_soc, ByteCodec);
let msg = b"4567".to_vec();
@@ -243,8 +243,8 @@ fn send_framed() {
}
{
- let a = a_soc.framed(ByteCodec);
- let b = b_soc.framed(ByteCodec);
+ let a = UdpFramed::new(a_soc, ByteCodec);
+ let b = UdpFramed::new(b_soc, ByteCodec);
let msg = b"".to_vec();