summary refs log tree commit diff
path: root/src/libstd/sys_common/net.rs
AgeCommit message (Collapse)AuthorLines
2017-05-04Reload nameserver information on lookup failureJon Gjengset-3/+16
As discussed in #41570, UNIX systems often cache the contents of /etc/resolv.conf, which can cause lookup failures to persist even after a network connection becomes available. This patch modifies lookup_host to force a reload of the nameserver entries following a lookup failure. This is in line with what many C programs already do (see #41570 for details). On systems with nscd, this should not be necessary, but not all systems run nscd. Introduces an std linkage dependency on libresolv on macOS/iOS (which also makes it necessary to update run-make/tools.mk). Fixes #41570. Depends on rust-lang/libc#585.
2017-03-25Fix libc::bind call on aarch64-linux-androidMarco A L Barbosa-2/+2
2017-02-04libstd/net: Add `peek` APIs to UdpSocket and TcpStreamTyler Julian-11/+13
These methods enable socket reads without side-effects. That is, repeated calls to peek() return identical data. This is accomplished by providing the POSIX flag MSG_PEEK to the underlying socket read operations. This also moves the current implementation of recv_from out of the platform-independent sys_common and into respective sys/windows and sys/unix implementations. This allows for more platform-dependent implementations.
2016-11-01std: Move sys_common to libstd/sys_commonBrian Anderson-0/+633
Make the directory structure reflect the module structure. I've always found the existing structure confusing.