Given an array of bytes and a group identifier, sendBytes packages the array into a DatagramPacket and sends it on its way. The receiver must reconstruct the actual information from bytes on the other side. You'll see this in How to Receive Information Broadcast by the Game . Note that the code is a bit cavalier about converting everything to bytes. Although careless, the code works for all of the converted data except in one, unlikely, scenario.
Potential problems occur with the player status.
The player name is a String and survives the conversion for the same reason that the game status string survives. However, if you change the game parameters, and allow them to exceed 255, then the numbers will not survive the conversion and will be broadcast incorrectly. The bingo.shared package contains three classes whose sole purpose is to just sit around and listen for packets to come across a MulticastSocket . The abstract superclass provides a constructor that its subclasses must call from their constructors, and a mechanism for gently stopping the thread. As you can see from the code, the constructor in ListenerThread creates a group identifier based on the group string passed into the constructor.