Skip to content

Commit 78dec21

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 bf5970e commit 78dec21

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

CHANGELOG.md

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

1818
ioctl_read_bad!(tcgets, libc::TCGETS, libc::termios);
1919
```
20+
- Added `MSG_WAITALL` to `MsgFlags` in `sys::socket`.
21+
([#1079](https://github.com/nix-rust/nix/pull/1079))
2022

2123
### Changed
2224
### Fixed

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)