|
|
|
@ -47,7 +47,6 @@ public class ClientP2P {
|
|
|
|
|
System.out.println("Server will listen on port " + port + " and serve files from " + directories.getDataHomeDirectory() + subdir);
|
|
|
|
|
directories.askOpenDataHomeDirectory(subdir);
|
|
|
|
|
System.out.println("Please enter list of servers to use; first one will be used to ask list of files");
|
|
|
|
|
hostList = HostList.getServList();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static void main(String [] args) {
|
|
|
|
@ -67,6 +66,13 @@ public class ClientP2P {
|
|
|
|
|
ttcp.setName("server TCP P2P-JAVA-PROJECT");
|
|
|
|
|
ttcp.start();
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
Thread.sleep(100);
|
|
|
|
|
} catch(InterruptedException e) {
|
|
|
|
|
Thread.currentThread().interrupt();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
c.hostList = HostList.getServList();
|
|
|
|
|
System.out.println("Client : Which transport protocol do you want to use? [TCP/udp]");
|
|
|
|
|
Scanner sc = new Scanner(System.in);
|
|
|
|
|
String transportchoosen = sc.nextLine();
|
|
|
|
|