Skip to content

Commit 810b24e

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 810b24e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

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)