modified usage help

This commit is contained in:
Flavien Haas 2020-03-21 19:45:07 +01:00 committed by Louis
parent 3edb0bf9e5
commit 60e0e3a7da
4 changed files with 7 additions and 8 deletions

View File

@ -8,9 +8,9 @@ Les étapes suivantes sont conseillées.
# Usage
tracker : java -ea tracker.Tracker, to specify port (default localhost:6969, range 6000 -> 6999): java -ea trackerP2P.trackerP2P -- <PORT>
serveur : java -ea serveurP2P.ServeurP2P, to specify port and tracker (default for server localhost:7070 tracker localhost:6969, range 7000 -> 7999): java -ea serveurP2P.ServeurP2P -- <serveurPORT> <trackerHOSTNAME> <trackerPORT>
client/serveur : java -ea clientP2P.ClientP2P -- <serverPORT> <trackerHOSTNAME> <trackerPORT>
tracker : java tracker.Tracker or java trackerP2P.trackerP2P -- <PORT> (default localhost:6969, range 6000 -> 6999)
server : java serveurP2P.ServeurP2P or java serveurP2P.ServeurP2P -- <serveurPORT> <trackerHOSTNAME> <trackerPORT> (default for server localhost:7070 and tracker localhost:6969, range 7000 -> 7999)
client/serveur : java clientP2P.ClientP2P or java clientP2P.ClientP2P -- <integratedServerPORT> <trackerHOSTNAME> <trackerPORT> (default for integratedServer localhost:7070 and tracker localhost:6969, range 7000 -> 7999)
## Étape 1 : Téléchargement à la FTP

View File

@ -73,7 +73,7 @@ public class ClientP2P {
*/
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 -- <serverPORT> <trackerHOSTNAME> <trackerPORT>");
System.out.println("usage : java clientP2P.ClientP2P or java clientP2P.ClientP2P -- <integratedServerPORT> <trackerHOSTNAME> <trackerPORT> (default for integratedServer localhost:7070 and tracker localhost:6969, range 7000 -> 7999)");
}
else{
ClientP2P c;

View File

@ -42,7 +42,7 @@ public class ServerP2P {
*/
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>");
System.out.println("usage : java serveurP2P.ServeurP2P or java serveurP2P.ServeurP2P -- <serveurPORT> <trackerHOSTNAME> <trackerPORT> (default for server localhost:7070 and tracker localhost:6969, range 7000 -> 7999)");
}
else{
ServerP2P s = new ServerP2P(args[1], args[2], args[3]);

View File

@ -41,7 +41,7 @@ public class Tracker {
*/
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 trackerP2P.trackerP2P, to specify port (default 6969, range 6000 -> 6999): java -ea trackerP2P.trackerP2P -- <PORT>");
System.out.println("usage : java tracker.Tracker or java trackerP2P.trackerP2P -- <PORT> (default localhost:6969, range 6000 -> 6999)");
}
else{
Tracker t;
@ -52,8 +52,7 @@ public class Tracker {
else {
System.out.println("Wrong port (6000 -> 6999), using default port 6969");
t = new Tracker(String.valueOf(defaultPort));
//t.logger.writeUDP("Wrong port (6000 -> 6999), using default port 6969", LogLevel.Warning);
//t.logger.writeTCP("Wrong port (6000 -> 6999), using default port 6969", LogLevel.Warning);
t.logger.write("Wrong port (6000 -> 6999), using default port 6969", LogLevel.Warning);
}
TrackerManagementUDP tmudp = new TrackerManagementUDP(t.port, t.logger);