recvmmsg.2: Minor fixes to Elie de Brauwer's patch

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2012-12-22 20:09:27 +01:00
parent f2246260a9
commit 2c208a7a60
1 changed files with 7 additions and 4 deletions

View File

@ -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