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

ease of modification for destination host

parent 89e436df
No related branches found
No related tags found
No related merge requests found
...@@ -15,7 +15,8 @@ import java.net.*; ...@@ -15,7 +15,8 @@ import java.net.*;
*/ */
public class TcpExample4Client public class TcpExample4Client
{ {
static int MAX_LOOP_COUNT = 4; static String DESTINATION_HOST = "localhost";
static int MAX_LOOP_COUNT = 4;
public static void main(String[] args) public static void main(String[] args)
{ {
...@@ -37,7 +38,7 @@ public class TcpExample4Client ...@@ -37,7 +38,7 @@ public class TcpExample4Client
long startTime = System.currentTimeMillis(); long startTime = System.currentTimeMillis();
// open a socket for each loop // open a socket for each loop
Socket socket = new Socket("localhost", 2317); Socket socket = new Socket(DESTINATION_HOST, 2317);
// Setup. Read the single line written by the server. // Setup. Read the single line written by the server.
// We'd do things a bit differently if many lines to be read // We'd do things a bit differently if many lines to be read
......
...@@ -19,7 +19,7 @@ public class MulticastReceiver { ...@@ -19,7 +19,7 @@ public class MulticastReceiver {
// https://en.wikipedia.org/wiki/Multicast_address // https://en.wikipedia.org/wiki/Multicast_address
// https://www.iana.org/assignments/multicast-addresses/multicast-addresses.xhtml // https://www.iana.org/assignments/multicast-addresses/multicast-addresses.xhtml
public static final String MULTICAST_ADDRESS = "239.1.2.15"; public static final String MULTICAST_ADDRESS = "239.1.2.15";
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
......
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