recuperation IP server
This commit is contained in:
parent
e6bf6ca8b1
commit
b647430c29
4 changed files with 12 additions and 6 deletions
|
@ -1,10 +1,12 @@
|
|||
package liste;
|
||||
|
||||
|
||||
public class ConstanteListeUtilisateur {
|
||||
|
||||
static public String IP_BROADCAST = "255.255.255.255";
|
||||
static public int SIZE_ORDRE = 100;
|
||||
static public int NUM_PORT_SERVER = 2000;
|
||||
static public int NUM_PORT_SERVER2 = 2001;
|
||||
public static final String IP_BROADCAST = "255.255.255.255";
|
||||
public static final int SIZE_ORDRE = 100;
|
||||
public static final int NUM_PORT_SERVER = 2000;
|
||||
public static final int NUM_PORT_SERVER2 = 2001;
|
||||
|
||||
public static final String URL_SERVLET = "http://localhost:8080/Servlet_MBP/test";
|
||||
}
|
||||
|
|
|
@ -4,6 +4,10 @@ import java.beans.PropertyChangeListener;
|
|||
import java.beans.PropertyChangeSupport;
|
||||
import java.io.*;
|
||||
|
||||
|
||||
// servlet : InetAddress address = InetAddress.getByName(new URL(liste.ConstanteListeUtilisateur.URL_SERVLET).getHost());
|
||||
|
||||
|
||||
public class TCPClient {
|
||||
InetAddress adresseCible = null;
|
||||
InetAddress adresseSource = null;
|
||||
|
|
|
@ -8,7 +8,7 @@ public class Get {
|
|||
|
||||
//private static final String USER_AGENT = "Mozilla/5.0";
|
||||
|
||||
private static final String GET_URL = "http://localhost:8080/Servlet_MBP/test";
|
||||
private static final String GET_URL = liste.ConstanteListeUtilisateur.URL_SERVLET;
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ import java.net.URL;
|
|||
|
||||
public class Post {
|
||||
|
||||
private static final String POST_URL = "http://localhost:8080/Servlet_MBP/test";
|
||||
private static final String POST_URL = liste.ConstanteListeUtilisateur.URL_SERVLET;
|
||||
|
||||
public static void sendPOST(String msg) throws IOException { // Publish cmd : change$$$id$$$nom$$$ip$$$dedans$$$statut
|
||||
URL obj = new URL(POST_URL);
|
||||
|
|
Loading…
Reference in a new issue