Exemplo n.º 1
0
 public void stop() {
   _thread.stop();
   try {
     _socket.close();
   } catch (Exception e) {
     Logger.error("@ClientMediator.stop error");
   }
   // kill tank
 }
Exemplo n.º 2
0
 public ClientMediator(String name, int id, PrintWriter bos, BufferedReader is, Socket socket) {
   super(name + id, null);
   _id = id;
   _socket = socket;
   _writer = bos;
   _reader = is;
   _thread = new MyThread(this);
   _thread.start();
   tellClient("set-id " + _id, 0);
   tellClient("load simple.txt", 0);
 }