Skip to content

Commit 3ffbd40

Browse files
socket: expose MSG_WAITALL in MsgFlags
MSG_WAITALL can be useful with recv() to wait the full amount of data requested. Signed-off-by: Stefano Garzarella <[email protected]>
1 parent de9ae7d commit 3ffbd40

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)