Fix server start
Fix printing
This commit is contained in:
parent
cb86478764
commit
9369176432
@ -47,7 +47,6 @@ public class ClientP2P {
|
|||||||
System.out.println("Server will listen on port " + port + " and serve files from " + directories.getDataHomeDirectory() + subdir);
|
System.out.println("Server will listen on port " + port + " and serve files from " + directories.getDataHomeDirectory() + subdir);
|
||||||
directories.askOpenDataHomeDirectory(subdir);
|
directories.askOpenDataHomeDirectory(subdir);
|
||||||
System.out.println("Please enter list of servers to use; first one will be used to ask list of files");
|
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) {
|
public static void main(String [] args) {
|
||||||
@ -67,6 +66,13 @@ public class ClientP2P {
|
|||||||
ttcp.setName("server TCP P2P-JAVA-PROJECT");
|
ttcp.setName("server TCP P2P-JAVA-PROJECT");
|
||||||
ttcp.start();
|
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]");
|
System.out.println("Client : Which transport protocol do you want to use? [TCP/udp]");
|
||||||
Scanner sc = new Scanner(System.in);
|
Scanner sc = new Scanner(System.in);
|
||||||
String transportchoosen = sc.nextLine();
|
String transportchoosen = sc.nextLine();
|
||||||
|
Loading…
Reference in New Issue
Block a user