use io::{self, ErrorKind};
pub mod args;
-#[cfg(any(not(cargobuild), feature = "backtrace"))]
+#[cfg(feature = "backtrace")]
pub mod backtrace;
pub mod condvar;
pub mod env;
Ok(path_to_local_addr(path.to_str().unwrap_or("")))
}
+ pub fn peek(&self, _buf: &mut [u8]) -> Result<usize> {
+ Err(Error::new(ErrorKind::Other, "TcpStream::peek not implemented"))
+ }
+
pub fn shutdown(&self, _how: Shutdown) -> Result<()> {
Err(Error::new(ErrorKind::Other, "TcpStream::shutdown not implemented"))
}
Ok(path_to_local_addr(path.to_str().unwrap_or("")))
}
+ pub fn peek(&self, _buf: &mut [u8]) -> Result<usize> {
+ Err(Error::new(ErrorKind::Other, "UdpSocket::peek not implemented"))
+ }
+
+ pub fn peek_from(&self, _buf: &mut [u8]) -> Result<(usize, SocketAddr)> {
+ Err(Error::new(ErrorKind::Other, "UdpSocket::peek_from not implemented"))
+ }
+
pub fn broadcast(&self) -> Result<bool> {
Err(Error::new(ErrorKind::Other, "UdpSocket::broadcast not implemented"))
}