|
|
@ -35,6 +35,11 @@ public class ServerP2P {
|
|
|
|
* @param args parameters
|
|
|
|
* @param args parameters
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
public static void main(String [] args) {
|
|
|
|
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]);
|
|
|
|
ServerP2P s = new ServerP2P(args[1]);
|
|
|
|
ServerManagementUDP smudp = new ServerManagementUDP(s.directories.getDataHomeDirectory() + subdir, s.port, s.logger);
|
|
|
|
ServerManagementUDP smudp = new ServerManagementUDP(s.directories.getDataHomeDirectory() + subdir, s.port, s.logger);
|
|
|
|
ServerManagementTCP smtcp = new ServerManagementTCP(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.setName("server TCP P2P-JAVA-PROJECT");
|
|
|
|
ttcp.start();
|
|
|
|
ttcp.start();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|