diff options
author | Michael Kerrisk <mtk.manpages@gmail.com> | 2012-12-22 20:09:27 +0100 |
---|---|---|
committer | Michael Kerrisk <mtk.manpages@gmail.com> | 2012-12-22 22:39:20 +0100 |
commit | 2c208a7a6038904815fa882968def791522faca4 (patch) | |
tree | 748028b0ea151e27bccd3e23695f04dd96df62b7 | |
parent | f2246260a9d1331646525b1ce1ef400cad8ab8d0 (diff) | |
download | man-pages-2c208a7a6038904815fa882968def791522faca4.tar.gz |
recvmmsg.2: Minor fixes to Elie de Brauwer's patch
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
-rw-r--r-- | man2/recvmmsg.2 | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/man2/recvmmsg.2 b/man2/recvmmsg.2 index 0c6db499d8..cc4971be08 100644 --- a/man2/recvmmsg.2 +++ b/man2/recvmmsg.2 @@ -170,20 +170,23 @@ The following program uses to receive multiple messages on a socket and stores them in multiple buffers. The call returns if all buffers are filled or if the -timeout specified is expired. +timeout specified has expired. The following snippet periodically generates UDP datagrams containing a random number: .in +4n .nf -.RB "$" " while true; do echo $RANDOM > /dev/udp/127.0.0.1/1234; sleep 0.25; done" + +.RB "$" " while true; do echo $RANDOM > /dev/udp/127.0.0.1/1234; " +.B " sleep 0.25; done" .fi .in -These datagrams are read by the example application which +These datagrams are read by the example application, which can give the following output: .in +4n .nf + .RB "$" " ./a.out" 5 messages received 1 11782 @@ -204,7 +207,7 @@ can give the following output: #include <sys/socket.h> int -main() +main(void) { #define VLEN 10 #define BUFSIZE 200 |