Skip to content
Snippets Groups Projects
Commit 507d6601 authored by Brutzman, Don's avatar Brutzman, Don
Browse files

comment

parent 952b330a
No related branches found
No related tags found
No related merge requests found
......@@ -82,7 +82,7 @@ public class MulticastUdpSender
group = new InetSocketAddress(multicastAddress, DESTINATION_PORT);
// Join group useful on receiving side
multicastSocket.joinGroup(group, ni = DisThreadedNetworkInterface.findIpv4Interface());
multicastSocket.joinGroup(group, ni = DisThreadedNetworkInterface.findIpv4Interface()); // utility function
// You can join multiple groups here
byte[] buffer = baos.toByteArray();
......@@ -96,6 +96,7 @@ public class MulticastUdpSender
// Put together an updated packet to send
dos.writeChars("From " + System.getProperty("user.name") + ": ");
dos.writeChars("MulticastSender packet " + Integer.toString(index) + ";"); // string chars for readability
// semicolon as message terminator prior to numbers
dos.writeInt (index); // arbitrary data, needs Java or byte-alignment to read
dos.writeFloat(17.0f); // arbitrary data, needs Java or byte-alignment to read
dos.writeFloat(23.0f); // arbitrary data, needs Java or byte-alignment to read
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment