O'Reilly logo

Microsoft® .NET Compact Framework Kick Start by Ronnie Yates, Erik Rubin

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required