Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Quick changes to IP address to be consistent.
  • Loading branch information
pid1 committed May 6, 2015
1 parent b824f5f commit ccb3832
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions src/server/server.java
@@ -1,4 +1,5 @@
package server;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
Expand Down Expand Up @@ -89,7 +90,7 @@ public class server extends ServerNetworking implements Thermostatable, Serializ
public void sendDesiredTemp(String desiredTemperature, String thermostatIP) throws Exception {
// Opens a sending port
// Replace this with the thermostatIP string if we get multicast working
Socket sender = new Socket("192.168.1.103", 7002);
Socket sender = new Socket("192.168.1.103", 7001);
try {
while (true) {
// Instantiate a printwriter so we can write to the output stream
Expand Down Expand Up @@ -212,4 +213,4 @@ public class server extends ServerNetworking implements Thermostatable, Serializ
this.dataStorage.printDataBase();
}

}
}
4 changes: 2 additions & 2 deletions src/thermostat/ThermostatDevice.java
Expand Up @@ -129,14 +129,14 @@ public class ThermostatDevice extends ThermostatNetworking implements Deviceable
Runnable runnable = new Runnable() {
public void run() {
try {
ServerSocket listener = new ServerSocket(7002);
ServerSocket listener = new ServerSocket(7001);
while (true) {
try {
while (true) {
//sets the socket to an accept state
Socket socket = listener.accept();
try {
// Creates a new input stream reader
// Creates anput stream reader
BufferedReader input = new BufferedReader(new InputStreamReader(socket.getInputStream()));
// Parses the input stream
int desiredTemperature = Integer.parseInt(input.readLine());
Expand Down

0 comments on commit ccb3832

Please sign in to comment.