mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-08-28 00:00:11 +02:00
Update comment in udp-codec example (#222)
This commit is contained in:
@@ -28,7 +28,7 @@ fn main() {
|
|||||||
let b = UdpSocket::bind(&addr).unwrap();
|
let b = UdpSocket::bind(&addr).unwrap();
|
||||||
let b_addr = b.local_addr().unwrap();
|
let b_addr = b.local_addr().unwrap();
|
||||||
|
|
||||||
// We're parsing each socket with the `LineCodec` defined above, and then we
|
// We're parsing each socket with the `BytesCodec` included in `tokio_io`, and then we
|
||||||
// `split` each codec into the sink/stream halves.
|
// `split` each codec into the sink/stream halves.
|
||||||
let (a_sink, a_stream) = UdpFramed::new(a, BytesCodec::new()).split();
|
let (a_sink, a_stream) = UdpFramed::new(a, BytesCodec::new()).split();
|
||||||
let (b_sink, b_stream) = UdpFramed::new(b, BytesCodec::new()).split();
|
let (b_sink, b_stream) = UdpFramed::new(b, BytesCodec::new()).split();
|
||||||
|
|||||||
Reference in New Issue
Block a user