diff options
Diffstat (limited to 'man2/recv.2')
-rw-r--r-- | man2/recv.2 | 80 |
1 files changed, 40 insertions, 40 deletions
diff --git a/man2/recv.2 b/man2/recv.2 index 7959bff25..03a2da47c 100644 --- a/man2/recv.2 +++ b/man2/recv.2 @@ -43,7 +43,7 @@ and then describes the differences between the calls. The only difference between .BR recv () and -.BR read (2) +.MR read 2 is the presence of .IR flags . With a zero @@ -51,7 +51,7 @@ With a zero argument, .BR recv () is generally equivalent to -.BR read (2) +.MR read 2 (but see NOTES). Also, the following call .P @@ -77,7 +77,7 @@ received from. .P 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)), +.MR fcntl 2 ), in which case the value \-1 is returned and .I errno is set to @@ -86,10 +86,10 @@ The receive calls normally return any data available, up to the requested amount, rather than waiting for receipt of the full amount requested. .P An application can use -.BR select (2), -.BR poll (2), +.MR select 2 , +.MR poll 2 , or -.BR epoll (7) +.MR epoll 7 to determine when more data arrives on a socket. .SS The flags argument The @@ -101,11 +101,11 @@ Set the close-on-exec flag for the file descriptor received via a UNIX domain file descriptor using the .B SCM_RIGHTS operation (described in -.BR unix (7)). +.MR unix 7 ). This flag is useful for the same reasons as the .B O_CLOEXEC flag of -.BR open (2). +.MR open 2 . .TP .BR MSG_DONTWAIT " (since Linux 2.2)" Enables nonblocking operation; if the operation would block, @@ -114,14 +114,14 @@ the call fails with the error This provides similar behavior to setting the .B O_NONBLOCK flag (via the -.BR fcntl (2) +.MR fcntl 2 .B F_SETFL operation), but differs in that .B MSG_DONTWAIT is a per-call option, whereas .B O_NONBLOCK is a setting on the open file description (see -.BR open (2)), +.MR open 2 ), which will affect all threads in the calling process and as well as other processes that hold file descriptors referring to the same open file description. @@ -134,9 +134,9 @@ an ancillary message with a type dependent on the protocol (for IPv4 .BR IP_RECVERR ). The user should supply a buffer of sufficient size. See -.BR cmsg (3) +.MR cmsg 3 and -.BR ip (7) +.MR ip 7 for more information. The payload of the original packet that caused the error is passed as normal data via @@ -234,7 +234,7 @@ return the real length of the packet or datagram, even when it was longer than the passed buffer. .IP For use with Internet stream sockets, see -.BR tcp (7). +.MR tcp 7 . .TP .BR MSG_WAITALL " (since Linux 2.2)" This flag requests that the operation block until the full request is @@ -291,7 +291,7 @@ The call is normally used only on a .I connected socket (see -.BR connect (2)). +.MR connect 2 ). It is equivalent to the call: .P .in +4n @@ -342,7 +342,7 @@ The fields and .I msg_iovlen describe scatter-gather locations, as discussed in -.BR readv (2). +.MR readv 2 . .P The field .IR msg_control , @@ -375,15 +375,15 @@ struct cmsghdr { .in .P Ancillary data should be accessed only by the macros defined in -.BR cmsg (3). +.MR cmsg 3 . .P As an example, Linux uses this ancillary data mechanism to pass extended errors, IP options, or file descriptors over UNIX domain sockets. For further information on the use of ancillary data in various socket domains, see -.BR unix (7) +.MR unix 7 and -.BR ip (7). +.MR ip 7 . .P The .I msg_flags @@ -468,7 +468,7 @@ address space. .B EINTR The receive was interrupted by delivery of a signal before any data was available; see -.BR signal (7). +.MR signal 7 . .TP .B EINVAL Invalid argument passed. @@ -481,9 +481,9 @@ Could not allocate memory for .B ENOTCONN The socket is associated with a connection-oriented protocol and has not been connected (see -.BR connect (2) +.MR connect 2 and -.BR accept (2)). +.MR accept 2 ). .TP .B ENOTSOCK The file descriptor @@ -524,40 +524,40 @@ and flags. .SH NOTES If a zero-length datagram is pending, -.BR read (2) +.MR read 2 and .BR recv () with a .I flags argument of zero provide different behavior. In this circumstance, -.BR read (2) +.MR read 2 has no effect (the datagram remains pending), while .BR recv () consumes the pending datagram. .P See -.BR recvmmsg (2) +.MR recvmmsg 2 for information about a Linux-specific system call that can be used to receive multiple datagrams in a single call. .SH EXAMPLES An example of the use of .BR recvfrom () is shown in -.BR getaddrinfo (3). +.MR getaddrinfo 3 . .SH SEE ALSO -.BR fcntl (2), -.BR getsockopt (2), -.BR read (2), -.BR recvmmsg (2), -.BR select (2), -.BR shutdown (2), -.BR socket (2), -.BR cmsg (3), -.BR sockatmark (3), -.BR ip (7), -.BR ipv6 (7), -.BR socket (7), -.BR tcp (7), -.BR udp (7), -.BR unix (7) +.MR fcntl 2 , +.MR getsockopt 2 , +.MR read 2 , +.MR recvmmsg 2 , +.MR select 2 , +.MR shutdown 2 , +.MR socket 2 , +.MR cmsg 3 , +.MR sockatmark 3 , +.MR ip 7 , +.MR ipv6 7 , +.MR socket 7 , +.MR tcp 7 , +.MR udp 7 , +.MR unix 7 |