Skip to content

Commit 5a2586b

Browse files
Merge #1079
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]>
2 parents de9ae7d + 3ffbd40 commit 5a2586b

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ This project adheres to [Semantic Versioning](http://semver.org/).
55

66
## [Unreleased]
77
### Added
8+
- Added `MSG_WAITALL` to `MsgFlags` in `sys::socket`.
9+
([#1079](https://github.com/nix-rust/nix/pull/1079))
10+
811
### Changed
912
### Fixed
1013
### Removed

src/sys/socket/mod.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,10 @@ libc_bitflags!{
132132
/// [`recv()`](fn.recv.html)
133133
/// or similar function shall still return this data.
134134
MSG_PEEK;
135+
/// Receive operation blocks until the full amount of data can be
136+
/// returned. The function may return smaller amount of data if a signal
137+
/// is caught, an error or disconnect occurs.
138+
MSG_WAITALL;
135139
/// Enables nonblocking operation; if the operation would block,
136140
/// `EAGAIN` or `EWOULDBLOCK` is returned. This provides similar
137141
/// behavior to setting the `O_NONBLOCK` flag

0 commit comments

Comments
 (0)