One of the great strengths of UDP (User Datagram Protocol) is broadcasting. This feature allows a single sent packet (datagram) to be to received by multiple peers on the same network. The alternative would be an independent send for each desired destination. The following scenarios are several examples when you might consider using UDP broadcasts:

  • Checking which network peers might be online before establishing more robust, .e.g TCP (Transmission Control Protocol), connections. Also known as Peer Discovery.
  • Informing networked peers of a newly available service.
  • Delivering the same, continuously updated, information to a group of peers.

The following short example demonstrates how to easily setup UDP broadcasting using NetworkComms.Net.

To send a UDP broadcast packet:

To receive UDP broadcast packets the configuration is exactly the same as for any other connection type:

We hoped you enjoyed this short tutorial, demonstrating how to send UDP broadcasts using NetworkComms.Net. If you have any feedback or questions please post a comment here or on our forums.