mirror of https://github.com/mkerrisk/man-pages
Relocate misplaced discussion of MSG_DONTWAIT.
This commit is contained in:
parent
28d88c1751
commit
62d4f1bd38
20
man2/recv.2
20
man2/recv.2
|
@ -100,7 +100,7 @@ received from (see
|
|||
.PP
|
||||
If no messages are available at the socket, the receive calls wait for a
|
||||
message to arrive, unless the socket is nonblocking (see
|
||||
.BR fcntl (2))
|
||||
.BR fcntl (2)),
|
||||
in which case the value \-1 is returned and the external variable
|
||||
.I errno
|
||||
set to
|
||||
|
@ -122,6 +122,15 @@ call is formed by
|
|||
.IR OR 'ing
|
||||
one or more of the following values:
|
||||
.TP
|
||||
.B MSG_DONTWAIT
|
||||
Enables non-blocking operation; if the operation would block,
|
||||
.B EAGAIN
|
||||
is returned (this can also be enabled using the
|
||||
.B O_NONBLOCK
|
||||
with the
|
||||
.B F_SETFL
|
||||
.BR fcntl (2)).
|
||||
.TP
|
||||
.B MSG_ERRQUEUE
|
||||
This flag
|
||||
specifies that queued errors should be received from the socket error queue.
|
||||
|
@ -334,15 +343,6 @@ is returned to indicate that expedited or out-of-band data were received.
|
|||
.B MSG_ERRQUEUE
|
||||
indicates that no data was received but an extended error from the socket
|
||||
error queue.
|
||||
.TP
|
||||
.B MSG_DONTWAIT
|
||||
Enables non-blocking operation; if the operation would block,
|
||||
.B EAGAIN
|
||||
is returned (this can also be enabled using the
|
||||
.B O_NONBLOCK
|
||||
with the
|
||||
.B F_SETFL
|
||||
.BR fcntl (2)).
|
||||
.SH "RETURN VALUE"
|
||||
These calls return the number of bytes received, or \-1
|
||||
if an error occurred. The return value will be 0 when the
|
||||
|
|
Loading…
Reference in New Issue