mirror of
https://github.com/opnsense/src.git
synced 2026-06-04 22:32:43 -04:00
recv.2: Explain how recv functions can return 0
Clarify the RETURN VALUES section with improved structure, the condition of the return value 0, and the setting of errno. PR: 174581 Reviewed by: jhb, ziaee Approved by: mhorne (mentor) Differential Revision: https://reviews.freebsd.org/D48955
This commit is contained in:
parent
6156da866e
commit
571df2c64a
1 changed files with 10 additions and 3 deletions
|
|
@ -316,12 +316,19 @@ On data reception the
|
|||
.Fa msg_len
|
||||
field is updated to the length of the received message.
|
||||
.Sh RETURN VALUES
|
||||
These calls except
|
||||
.Fn recvmmsg
|
||||
On successful completion,
|
||||
.Fn recv ,
|
||||
.Fn recvfrom ,
|
||||
and
|
||||
.Fn recvmsg
|
||||
return the number of bytes received.
|
||||
.Fn recvmmsg
|
||||
returns the number of messages received.
|
||||
A value of -1 is returned if an error occurred.
|
||||
If no messages are available to be received and the peer has
|
||||
performed an orderly shutdown, 0 is returned.
|
||||
Otherwise, -1 is returned and
|
||||
.Va errno
|
||||
is set to indicate the error.
|
||||
.Sh ERRORS
|
||||
The calls fail if:
|
||||
.Bl -tag -width Er
|
||||
|
|
|
|||
Loading…
Reference in a new issue