26 lignes
710 o
Java
26 lignes
710 o
Java
package liste;
|
|
|
|
//import java.util.concurrent.ExecutorService;
|
|
//import java.util.concurrent.Executors;
|
|
|
|
public class MainUDPMulti {
|
|
|
|
public static void main(String[] args) { //ne marche pas : soit route (routeur) soit code soit 2 ....
|
|
int portServer = 2000;
|
|
int multicastPort = 7000;
|
|
|
|
UdpMulticastServer server = new UdpMulticastServer(portServer, multicastPort);
|
|
UdpMulticastClient client = new UdpMulticastClient(portServer, multicastPort);
|
|
|
|
Thread ts = new Thread(server);
|
|
Thread t0 = new Thread(client);
|
|
|
|
|
|
ts.start();
|
|
t0.start();
|
|
|
|
//ExecutorService executorService = Executors.newFixedThreadPool(2);
|
|
//executorService.submit(server);
|
|
//executorService.submit(client);
|
|
}
|
|
}
|