Self explanatory question. Can we get multiple UDP packets in one socket recv call when using Multicast?
When using recvfrom
or recv
on a UDP socket, you will only ever receive one complete packet at a time.
This applies to both unicast and multicast packets.
The recvmmsg() system call is an extension of recvmsg(2) that allows the caller to receive multiple messages from a socket using a single system call. (This has performance benefits for some applications.) A further extension over recvmsg(2) is support for a timeout on the receive operation.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.