-
Notifications
You must be signed in to change notification settings - Fork 12.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #73761 - rijenkii:master, r=KodrAus
Add `peek` and `peek_from` to `UnixStream` and `UnixDatagram` This is my first PR, so I'm sure I've done some things wrong. This PR: * adds `peek` function to `UnixStream`; * adds `peek` and `peek_from` to `UnixDatagram`; * moves `UnixDatagram::recv_from` implementation to a private function `recv_from_flags`, as `peek_from` uses the same code, just with different flags. I've taken the documentation from `TcpStream` and `UdpStream`, so it may or may not make sense (I'm bad with english words). Also, I'm not sure what I should write in the `unstable` attribute, so I've made up the name and set the issue to "none". Closes #68565.
- Loading branch information
Showing
2 changed files
with
192 additions
and
20 deletions.
There are no files selected for viewing
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