|
|
|
@ -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();
|
|
|
|
|
}
|
|
|
|
|