From 60e0e3a7dab18c4ef471f12625cdf5d75eff511e Mon Sep 17 00:00:00 2001 From: flavien Date: Sat, 21 Mar 2020 19:45:07 +0100 Subject: [PATCH] modified usage help --- README.md | 6 +++--- src/clientP2P/ClientP2P.java | 2 +- src/serverP2P/ServerP2P.java | 2 +- src/tracker/Tracker.java | 5 ++--- 4 files changed, 7 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 822bd25..866870f 100644 --- a/README.md +++ b/README.md @@ -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 -- -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 -- -client/serveur : java -ea clientP2P.ClientP2P -- +tracker : java tracker.Tracker or java trackerP2P.trackerP2P -- (default localhost:6969, range 6000 -> 6999) +server : java serveurP2P.ServeurP2P or java serveurP2P.ServeurP2P -- (default for server localhost:7070 and tracker localhost:6969, range 7000 -> 7999) +client/serveur : java clientP2P.ClientP2P or java clientP2P.ClientP2P -- (default for integratedServer localhost:7070 and tracker localhost:6969, range 7000 -> 7999) ## Étape 1 : Téléchargement à la FTP diff --git a/src/clientP2P/ClientP2P.java b/src/clientP2P/ClientP2P.java index 6c2814c..e0bd9e3 100644 --- a/src/clientP2P/ClientP2P.java +++ b/src/clientP2P/ClientP2P.java @@ -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 -- "); + System.out.println("usage : java clientP2P.ClientP2P or java clientP2P.ClientP2P -- (default for integratedServer localhost:7070 and tracker localhost:6969, range 7000 -> 7999)"); } else{ ClientP2P c; diff --git a/src/serverP2P/ServerP2P.java b/src/serverP2P/ServerP2P.java index df0a3f1..7d607b9 100644 --- a/src/serverP2P/ServerP2P.java +++ b/src/serverP2P/ServerP2P.java @@ -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 -- "); + System.out.println("usage : java serveurP2P.ServeurP2P or java serveurP2P.ServeurP2P -- (default for server localhost:7070 and tracker localhost:6969, range 7000 -> 7999)"); } else{ ServerP2P s = new ServerP2P(args[1], args[2], args[3]); diff --git a/src/tracker/Tracker.java b/src/tracker/Tracker.java index b274542..2ad06d4 100644 --- a/src/tracker/Tracker.java +++ b/src/tracker/Tracker.java @@ -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 -- "); + System.out.println("usage : java tracker.Tracker or java trackerP2P.trackerP2P -- (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);