cli #52

Merged
flavien merged 2 commits from cli into etape4 5 years ago

@ -71,6 +71,11 @@ public class ClientP2P {
* @param args server listenning port
*/
public static void main(String [] args) {
if (args[1].equals("help") || args[1].equals("-h") || args[1].equals("h")){
System.out.println("usage : java -ea clientP2P.ClientP2P -- <PORT> ");
}
else{
ClientP2P c;
try {
c = new ClientP2P(args[1]);
@ -124,4 +129,5 @@ public class ClientP2P {
t.setName("client P2P-JAVA-PROJECT");
t.start();
}
}
}

@ -35,6 +35,11 @@ public class ServerP2P {
* @param args parameters
*/
public static void main(String [] args) {
if (args[1].equals("help") || args[1].equals("-h") || args[1].equals("h")){
System.out.println("usage : java -ea serveurP2P.ServeurP2P -- <serveurPORT> <trackerHOSTNAME> <trackerPORT>");
}
else{
ServerP2P s = new ServerP2P(args[1]);
ServerManagementUDP smudp = new ServerManagementUDP(s.directories.getDataHomeDirectory() + subdir, s.port, s.logger);
ServerManagementTCP smtcp = new ServerManagementTCP(s.directories.getDataHomeDirectory() + subdir, s.port, s.logger);
@ -45,5 +50,6 @@ public class ServerP2P {
ttcp.setName("server TCP P2P-JAVA-PROJECT");
ttcp.start();
}
}
}

Loading…
Cancel
Save