Пример #1
0
 public void stop() {
   _thread.stop();
   try {
     _socket.close();
   } catch (Exception e) {
     Logger.error("@ClientMediator.stop error");
   }
   // kill tank
 }
Пример #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);
 }