Skip to content

Commit

Permalink
Merge #1079
Browse files Browse the repository at this point in the history
1079: socket: expose MSG_WAITALL in MsgFlags r=asomers a=stefano-garzarella

MSG_WAITALL can be useful with recv() to wait the full amount of data requested.

Co-authored-by: Stefano Garzarella <[email protected]>
  • Loading branch information
bors[bot] and stefano-garzarella committed Jun 7, 2019
2 parents de9ae7d + 3ffbd40 commit 5a2586b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ This project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased]
### Added
- Added `MSG_WAITALL` to `MsgFlags` in `sys::socket`.
([#1079](https://github.com/nix-rust/nix/pull/1079))

### Changed
### Fixed
### Removed
Expand Down
4 changes: 4 additions & 0 deletions src/sys/socket/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,10 @@ libc_bitflags!{
/// [`recv()`](fn.recv.html)
/// or similar function shall still return this data.
MSG_PEEK;
/// Receive operation blocks until the full amount of data can be
/// returned. The function may return smaller amount of data if a signal
/// is caught, an error or disconnect occurs.
MSG_WAITALL;
/// Enables nonblocking operation; if the operation would block,
/// `EAGAIN` or `EWOULDBLOCK` is returned. This provides similar
/// behavior to setting the `O_NONBLOCK` flag
Expand Down

0 comments on commit 5a2586b

Please sign in to comment.