diff --git a/Network_Test.zip b/Network_Test.zip new file mode 100644 index 0000000..af7d239 Binary files /dev/null and b/Network_Test.zip differ diff --git a/bin/networking/networking.class b/bin/networking/networking.class index 9cdd260..c969b8e 100644 Binary files a/bin/networking/networking.class and b/bin/networking/networking.class differ diff --git a/src/networking/networking.java b/src/networking/networking.java index 63a12d7..c6e7523 100644 --- a/src/networking/networking.java +++ b/src/networking/networking.java @@ -8,18 +8,18 @@ public interface networking { // Listen for the current temperature on port 7000 - static final int receiveCurrentTempPORT = 7000; + int receiveCurrentTempPORT = 7000; // Send the current temperature on port 7000 - static final int sendCurrentTempPORT = 7000; + int sendCurrentTempPORT = 7000; // Listen for the desired temperature on port 7001 - static final int receiveDesiredTempPORT = 7001; + int receiveDesiredTempPORT = 7001; // Send the desired temperature on port 7001 - static final int sendDesiredTempPORT = 7001; + int sendDesiredTempPORT = 7001; // Discover protocol receiving port - static final int receiveDiscoverPort=7777; + int receiveDiscoverPort=7777; // Discover protocol sending port - static final int sendDiscoverPORT=7778; + int sendDiscoverPORT=7778; // Server IP object String serverIP = new String(); @@ -37,7 +37,7 @@ public static void receiveCurrentTemp() throws Exception { BufferedReader input = new BufferedReader(new InputStreamReader(socket.getInputStream())); int currentTemperature = Integer.parseInt(input.readLine()); - System.out.printf("The current temperature is:", currentTemperature); + System.out.printf("The current temperature is: %d \n", currentTemperature); } finally { socket.close(); } @@ -58,7 +58,7 @@ public static void receiveDesiredTemp() throws Exception { BufferedReader input = new BufferedReader(new InputStreamReader(socket.getInputStream())); int currentTemperature = Integer.parseInt(input.readLine()); - System.out.printf("The desired temperature is:", currentTemperature); + System.out.printf("The desired temperature is: %d \n", currentTemperature); } finally { socket.close(); }