-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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.
- Loading branch information
Tyler Julian
committed
Feb 4, 2017
1 parent
9749df5
commit a40be08
Showing
8 changed files
with
251 additions
and
17 deletions.
There are no files selected for viewing
Submodule liblibc
updated
14 files
+2 −2 | Cargo.lock | |
+1 −1 | Cargo.toml | |
+4 −0 | src/redox.rs | |
+18 −0 | src/unix/bsd/apple/mod.rs | |
+1 −0 | src/unix/bsd/freebsdlike/dragonfly/mod.rs | |
+16 −0 | src/unix/bsd/freebsdlike/freebsd/mod.rs | |
+4 −0 | src/unix/bsd/mod.rs | |
+1 −0 | src/unix/bsd/netbsdlike/mod.rs | |
+10 −0 | src/unix/bsd/netbsdlike/netbsd/mod.rs | |
+16 −0 | src/unix/haiku/mod.rs | |
+1 −0 | src/unix/notbsd/android/mod.rs | |
+1 −0 | src/unix/notbsd/linux/mod.rs | |
+7 −0 | src/unix/notbsd/mod.rs | |
+20 −0 | src/unix/solaris/mod.rs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters