Fix last commit

pull/1/head
Louis Royer 5 years ago
parent b3cc441d9e
commit f4e318dfe5

@ -6,9 +6,9 @@ import tools.Directories;
public class ClientP2P {
private String host;
private int port;
private String dataHomeDirectory;
private Directories directories;
public ClientP2P() {
Directories directories = new Directories("P2P_JAVA_PROJECT_CLIENT");
directories = new Directories("P2P_JAVA_PROJECT_CLIENT");
host = "localhost";
port = 40000;
System.out.println("Client will try to contact server at " + host + " on port " + port + ". It will save files in " + directories.getDataHomeDirectory());

@ -4,12 +4,11 @@ import tools.Directories;
public class ServerP2P {
private int port;
private String dataHomeDirectory;
public ServerP2P() {
Directories directories = new Directories("P2P_JAVA_PROJECT_SERVER");
private Directories directories;
public ServerP2P() {
directories = new Directories("P2P_JAVA_PROJECT_SERVER");
port = 40000;
dataHomeDirectory = d.getDataHomeDirectory();
System.out.println("Server will listen on port " + port + " and serve files from " + directories.getDataHomeDirectory());
directories.askOpenDataHomeDirectory();
}

@ -83,6 +83,7 @@ public class Directories {
openDataHomeDirectory();
}
}
}
}

Loading…
Cancel
Save