Search code examples
csocketsnetwork-programmingudpmulticast

Can you get two packets in one socket recv call for multicast?


Self explanatory question. Can we get multiple UDP packets in one socket recv call when using Multicast?


Solution

  • 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.