mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-09-08 00:00:13 +02:00
Add a simple UDP test
This commit is contained in:
+13
@@ -1,3 +1,4 @@
|
||||
use std::fmt;
|
||||
use std::io::{self, ErrorKind, Read, Write};
|
||||
use std::mem;
|
||||
use std::net::{self, SocketAddr, Shutdown};
|
||||
@@ -127,6 +128,12 @@ impl Iterator for NonblockingIter {
|
||||
}
|
||||
}
|
||||
|
||||
impl fmt::Debug for TcpListener {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
self.listener.io().fmt(f)
|
||||
}
|
||||
}
|
||||
|
||||
impl Stream for TcpListener {
|
||||
type Item = Ready;
|
||||
type Error = io::Error;
|
||||
@@ -335,6 +342,12 @@ impl<'a> Write for &'a TcpStream {
|
||||
}
|
||||
}
|
||||
|
||||
impl fmt::Debug for TcpStream {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
self.source.io().fmt(f)
|
||||
}
|
||||
}
|
||||
|
||||
impl Stream for TcpStream {
|
||||
type Item = Ready;
|
||||
type Error = io::Error;
|
||||
|
||||
Reference in New Issue
Block a user