use sys_common::{AsInner, FromInner, IntoInner};
use sys::fd::FileDesc;
use time::Duration;
-
+ use convert::TryFrom;
pub extern crate libc as netc;
}
impl TcpStream {
- pub fn connect(_: &SocketAddr) -> io::Result<TcpStream> {
+ pub fn connect(_: io::Result<&SocketAddr>) -> io::Result<TcpStream> {
unimpl!();
}
}
impl TcpListener {
- pub fn bind(_: &SocketAddr) -> io::Result<TcpListener> {
+ pub fn bind(_: io::Result<&SocketAddr>) -> io::Result<TcpListener> {
unimpl!();
}
}
impl UdpSocket {
- pub fn bind(_: &SocketAddr) -> io::Result<UdpSocket> {
+ pub fn bind(_: io::Result<&SocketAddr>) -> io::Result<UdpSocket> {
unimpl!();
}
unimpl!();
}
- pub fn connect(&self, _: &SocketAddr) -> io::Result<()> {
+ pub fn connect(&self, _: io::Result<&SocketAddr>) -> io::Result<()> {
unimpl!();
}
}
}
}
+ impl LookupHost {
+ pub fn port(&self) -> u16 {
+ unimpl!();
+ }
+ }
+
unsafe impl Sync for LookupHost {}
unsafe impl Send for LookupHost {}
- pub fn lookup_host(_: &str) -> io::Result<LookupHost> {
- unimpl!();
+
+ impl<'a> TryFrom<&'a str> for LookupHost {
+ type Error = io::Error;
+
+ fn try_from(_v: &'a str) -> io::Result<LookupHost> {
+ unimpl!();
+ }
+ }
+
+ impl<'a> TryFrom<(&'a str, u16)> for LookupHost {
+ type Error = io::Error;
+
+ fn try_from(_v: (&'a str, u16)) -> io::Result<LookupHost> {
+ unimpl!();
+ }
}
}