about summary refs log tree commit diff
path: root/src/libstd/sys/redox
diff options
context:
space:
mode:
authorSteven Fackler <sfackler@gmail.com>2017-07-04 23:46:24 -0700
committerSteven Fackler <sfackler@gmail.com>2017-07-06 19:35:49 -0700
commit8c92da3c518111b28f0b5fb297ab719bf353cdc6 (patch)
treee68b05e25cf9a0a16bd9d6e72d161f92b843beac /src/libstd/sys/redox
parentccf401f8f7847413ac43f38e3c86016becf67b07 (diff)
downloadrust-8c92da3c518111b28f0b5fb297ab719bf353cdc6.tar.gz
rust-8c92da3c518111b28f0b5fb297ab719bf353cdc6.zip
Implement TcpStream::connect_timeout
This breaks the "single syscall rule", but it's really annoying to hand
write and is pretty foundational.
Diffstat (limited to 'src/libstd/sys/redox')
-rw-r--r--src/libstd/sys/redox/net/tcp.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libstd/sys/redox/net/tcp.rs b/src/libstd/sys/redox/net/tcp.rs
index 17673f0bd60..5d1067e4039 100644
--- a/src/libstd/sys/redox/net/tcp.rs
+++ b/src/libstd/sys/redox/net/tcp.rs
@@ -32,6 +32,10 @@ impl TcpStream {
         Ok(TcpStream(File::open(&Path::new(path.as_str()), &options)?))
     }
 
+    pub fn connect_timeout(_addr: &SocketAddr, _timeout: Duration) -> Result<()> {
+        Err(Error::new(ErrorKind::Other, "TcpStream::connect_timeout not implemented"))
+    }
+
     pub fn duplicate(&self) -> Result<TcpStream> {
         Ok(TcpStream(self.0.dup(&[])?))
     }