diff options
author | Stefano Garzarella <sgarzare@redhat.com> | 2019-06-04 18:10:21 +0200 |
---|---|---|
committer | Stefano Garzarella <sgarzare@redhat.com> | 2019-06-07 15:29:19 +0200 |
commit | 3ffbd40b9cb238948409f5fe258a56cd3feac175 (patch) | |
tree | 795a04b77b8906898dfb2192193a22a645429045 /src/sys/socket | |
parent | de9ae7d6cd9b95d9d29ba8f181889bb201da82a5 (diff) | |
download | nix-3ffbd40b9cb238948409f5fe258a56cd3feac175.zip |
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 <sgarzare@redhat.com>
Diffstat (limited to 'src/sys/socket')
-rw-r--r-- | src/sys/socket/mod.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/sys/socket/mod.rs b/src/sys/socket/mod.rs index 0ba28358..a8631f24 100644 --- a/src/sys/socket/mod.rs +++ b/src/sys/socket/mod.rs @@ -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 |