public static void main(String[] args) {
        Client client = new Client();

        try {
            client.setDaemon(true);
            client.setPriority(NORM_PRIORITY);
            client.start();
            System.out.print("Please enter your name:");
            client.out.println("");
            while (!client.validate ) {
                client.out.println(getUserName());
                Thread.sleep(1000);
            }
            client.oos = new ObjectOutputStream(client.clientSocket.getOutputStream());
            while (!client.disconnected) {

                if ((client.fuser = client.inu.readLine()) != null) {

                    Message message = new Message(client.getName(), client.fuser,"Ok");
                    client.oos.writeObject(message);
                    client.oos.flush();
                    if (client.fuser.equalsIgnoreCase("exit")) {
                        client.disconnected = true;
                        System.out.println("Disconnected");
                        break;
                    }
                }
            }
            client.out.close();
            client.in.close();
            client.inu.close();
            client.oos.close();
            client.clientSocket.close();
        } catch (Exception e) {
            System.out.println(e.getMessage());
        }
    }