O'Reilly logo

Linux Socket Programming by Example by Warren W. Gay

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

Chapter 13. Broadcasting with UDP

Communication would be inefficient if it always had to be accomplished between two individuals. Broadcasting, on the other hand, allows information to be disseminated to many recipients at once.

In this chapter, you will learn how to

  • Establish a broadcast UDP socket

  • Send broadcast messages with a socket

  • Receive broadcast messages with a socket

Upon completion of this chapter, you will know how to write programs using IPv4 socket broadcast facilities.

Understanding Broadcast Addresses

To use broadcasting, you must know about certain IP broadcast address conventions for IPv4. (Review Figure 3.1 in Chapter 3, "Address Conversion Functions.") Recall that the IP address is split between the Network ID portion on the left ...

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