Fix server start

Fix printing
This commit is contained in:
Louis Royer 2020-03-18 18:31:15 +01:00
parent cb86478764
commit 9369176432

View File

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