Multicasting with UDP Packets

The UDPClient can be easily configured to broadcast to a multicast IP address or to receive packets from a multicast IP address. A multicast IP address is operated by a server that maintains a list of multicast subscribers. When a packet is sent to a multicast IP address, the server sends a copy of the packet to the IP address of every client who has subscribed.

Sending Multicast Packets

To send UDP packets to a multicast IP address, no special action is required. Simply send your packets as shown in the sample code from the earlier section “Writing Code for UdpClient,” but choose a multicast IP address as the destination for the packets.

Receiving Multicast Packets

To receive multicast packets, you must first subscribe ...

Get Microsoft® .NET Compact Framework Kick Start now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.