]> git.lizzy.rs Git - rust.git/commit
std: Add timeouts to unix connect/accept
authorAlex Crichton <alex@alexcrichton.com>
Wed, 23 Apr 2014 01:38:59 +0000 (18:38 -0700)
committerAlex Crichton <alex@alexcrichton.com>
Thu, 24 Apr 2014 23:24:09 +0000 (16:24 -0700)
commit6328f7c199a1697aaee7e5fe2b397c457e6c311a
tree21b8afe559302ed90be9dbb725c700513d9cfe7b
parent67ee480936947aa5b1953b7b6e48a0c7a191501e
std: Add timeouts to unix connect/accept

This adds support for connecting to a unix socket with a timeout (a named pipe
on windows), and accepting a connection with a timeout. The goal is to bring
unix pipes/named sockets back in line with TCP support for timeouts.

Similarly to the TCP sockets, all methods are marked #[experimental] due to
uncertainty about the type of the timeout argument.

This internally involved a good bit of refactoring to share as much code as
possible between TCP servers and pipe servers, but the core implementation did
not change drastically as part of this commit.

cc #13523
12 files changed:
src/liblibc/lib.rs
src/libnative/io/c_win32.rs
src/libnative/io/mod.rs
src/libnative/io/net.rs
src/libnative/io/pipe_unix.rs
src/libnative/io/pipe_win32.rs
src/libnative/io/util.rs [new file with mode: 0644]
src/librustuv/net.rs
src/librustuv/pipe.rs
src/librustuv/uvio.rs
src/libstd/io/net/unix.rs
src/libstd/rt/rtio.rs