From 2c208a7a6038904815fa882968def791522faca4 Mon Sep 17 00:00:00 2001 From: Michael Kerrisk Date: Sat, 22 Dec 2012 20:09:27 +0100 Subject: [PATCH] recvmmsg.2: Minor fixes to Elie de Brauwer's patch Signed-off-by: Michael Kerrisk --- man2/recvmmsg.2 | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/man2/recvmmsg.2 b/man2/recvmmsg.2 index 0c6db499d..cc4971be0 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 int -main() +main(void) { #define VLEN 10 #define BUFSIZE 200