lpr-b:mainchat
no way to compare when less than two revisions
Differenze
Queste sono le differenze tra la revisione selezionata e la versione attuale della pagina.
| — | lpr-b:mainchat [23/11/2007 alle 13:56 (18 anni fa)] (versione attuale) – creata Marco Danelutto | ||
|---|---|---|---|
| Linea 1: | Linea 1: | ||
| + | <code java> | ||
| + | package chatMulticast; | ||
| + | import java.net.InetAddress; | ||
| + | import java.net.UnknownHostException; | ||
| + | |||
| + | public class Chat { | ||
| + | |||
| + | public static void main(String[] args) { | ||
| + | |||
| + | try { | ||
| + | InetAddress chatAddress = InetAddress.getByName(args[0]); | ||
| + | int port = Integer.parseInt(args[1]); | ||
| + | CopyIn copyIn = new CopyIn(chatAddress, | ||
| + | CopyOut copyOut = new CopyOut(chatAddress, | ||
| + | copyIn.start(); | ||
| + | copyOut.start(); | ||
| + | } catch (UnknownHostException e) { | ||
| + | e.printStackTrace(); | ||
| + | } | ||
| + | |||
| + | } | ||
| + | |||
| + | } | ||
| + | </ | ||
lpr-b/mainchat.txt · Ultima modifica: 23/11/2007 alle 13:56 (18 anni fa) da Marco Danelutto
