summary refs log tree commit diff
path: root/src/libstd/lib.rs
diff options
context:
space:
mode:
authorTyler Julian <tjulian@uber.com>2017-01-10 19:11:56 -0800
committerTyler Julian <tjulian@uber.com>2017-02-04 12:00:19 -0800
commita40be0857c7bf48e39f815417b0b5293cd8ed1aa (patch)
treef142739d4a6f706f583380436bcb28e4ca6f8ffd /src/libstd/lib.rs
parent9749df52b7ecfc8123e392b9d49786e2abf20320 (diff)
downloadrust-a40be0857c7bf48e39f815417b0b5293cd8ed1aa.tar.gz
rust-a40be0857c7bf48e39f815417b0b5293cd8ed1aa.zip
libstd/net: Add `peek` APIs to UdpSocket and TcpStream
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.
Diffstat (limited to 'src/libstd/lib.rs')
-rw-r--r--src/libstd/lib.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/libstd/lib.rs b/src/libstd/lib.rs
index 9557c520c50..3c06409e3b1 100644
--- a/src/libstd/lib.rs
+++ b/src/libstd/lib.rs
@@ -275,6 +275,7 @@
 #![feature(oom)]
 #![feature(optin_builtin_traits)]
 #![feature(panic_unwind)]
+#![feature(peek)]
 #![feature(placement_in_syntax)]
 #![feature(prelude_import)]
 #![feature(pub_restricted)]