Skip to content
Snippets Groups Projects
Commit ccd8aebf authored by brutzman's avatar brutzman
Browse files

put loopsize parameter where it is easily recognized and modified

parent a5b9a919
No related branches found
No related tags found
No related merge requests found
...@@ -19,8 +19,11 @@ public class MulticastSender { ...@@ -19,8 +19,11 @@ public class MulticastSender {
public static final String MULTICAST_ADDRESS = "239.1.2.15"; // within reserved multicast address range public static final String MULTICAST_ADDRESS = "239.1.2.15"; // within reserved multicast address range
public static final int DESTINATION_PORT = 1718; public static final int DESTINATION_PORT = 1718;
/** Time to live: how many router-decrement levels can be crossed */ /** Time to live: how many router-decrement levels can be crossed */
public static final int TTL = 10; public static final int TTL = 10;
public static final int loopSize = 20; // 20000
public static final String QUIT_SENTINEL = "QUIT QUIT QUIT!"; public static final String QUIT_SENTINEL = "QUIT QUIT QUIT!";
...@@ -46,10 +49,8 @@ public class MulticastSender { ...@@ -46,10 +49,8 @@ public class MulticastSender {
multicastSocket.joinGroup(multicastAddress); multicastSocket.joinGroup(multicastAddress);
// You can join multiple groups here // You can join multiple groups here
int loopSize = 20;
for (int index = 0; index < loopSize; index++) for (int index = 0; index < loopSize; index++)
{ {
// Put together a message with binary content. "ByteArrayOutputStream" // Put together a message with binary content. "ByteArrayOutputStream"
// is a java.io utility that lets us put together an array of binary // is a java.io utility that lets us put together an array of binary
// data, which we put into the UDP packet. // data, which we put into the UDP packet.
......
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