82fbfc975b563213df2c108f1bc0b23a43711fed
7 * main for testing ClientSimplifie
9 private static void main1() {
10 ClientSimplifie client
= null;
11 BufferedReader userInput
= null;
14 client
= new ClientSimplifie();
15 userInput
= new BufferedReader(new InputStreamReader(System
.in
));
18 String line
= userInput
.readLine();
22 String rline
= client
.receiveMsg();
23 System
.out
.println(rline
);
26 catch (IOException e
) {
27 System
.err
.println("IOException: " + e
);
32 if (userInput
!= null) {
36 catch (IOException e
) {
37 System
.err
.println("IOException: " + e
);
45 * main for text based message broadcasting
47 public static void main2() {
48 SocketClient client
= null;
53 client
= new SocketClient();
54 thS
= new Thread(new ThreadClientSend(client
));
55 thR
= new Thread(new ThreadClientReceive(client
));
62 System
.err
.println("Exception: " + e
);
70 catch (InterruptedException e
) {
71 System
.err
.println("InterruptedException: " + e
);
78 public static void main(String
[] args
) {
79 SocketClient client
= null;
84 client
= new SocketClient(true);
85 thS
= new Thread(new ThreadClientoSend(client
));
86 thR
= new Thread(new ThreadClientoReceive(client
));
93 System
.err
.println("Exception: " + e
);
101 catch (InterruptedException e
) {
102 System
.err
.println("InterruptedException: " + e
);