3 public class ThreadClientoSend
implements Runnable
{
4 private SocketClient client
;
6 ThreadClientoSend(SocketClient c
) {
11 BufferedReader userInput
= null;
13 userInput
= new BufferedReader(new InputStreamReader(System
.in
));
16 String line
= userInput
.readLine();
17 if (line
.equals(".")) {
20 Message oMsg
= new Message("Name", line
);
21 client
.sendoMsg(oMsg
);
22 System
.out
.println(Thread
.currentThread().getName() + " a envoye " + oMsg
);
25 catch (IOException e
) {
26 System
.err
.println("IOException: " + e
);
30 if (userInput
!= null) {
34 catch (IOException e
) {
35 System
.err
.println("IOException: " + e
);