public void exec() {
        InputStream is;
        OutputStream os;
        try {
            is = Sock.getInputStream();
            os = Sock.getOutputStream();
        } catch (IOException ex) {
            ex.printStackTrace();
            return;
        }
        boolean running = true;
        while (running) {
            try {
                running &= exec_request(is, os);
                os.flush();
            } catch (IOException ex1) {
                running = false;
                ex1.printStackTrace();
            }
        }
    }