Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Added a .zip file with the framework I used for testing networking ca…
…pabilities.
  • Loading branch information
pid1 committed Feb 8, 2015
1 parent 930797e commit 209cb12
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
Binary file added Network_Test.zip
Binary file not shown.
Binary file modified bin/networking/networking.class
Binary file not shown.
16 changes: 8 additions & 8 deletions src/networking/networking.java
Expand Up @@ -8,18 +8,18 @@ import java.net.Socket;

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();
Expand All @@ -37,7 +37,7 @@ public interface networking {
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();
}
Expand All @@ -58,7 +58,7 @@ public interface networking {
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();
}
Expand Down

0 comments on commit 209cb12

Please sign in to comment.