@Override
    public void run()
    {
        /*
        * This code will run in a different Thread
        * Thread that is responsible to listen to new messages from the client
        * */

        if (dataInputStream == null)                        //check if we already created the dataInputStream stream
        {
            try
            {
                /* Create new Data input stream from the client input stream */
                dataInputStream = new DataInputStream(socket.getInputStream());
            } catch (IOException e)
            {
                e.printStackTrace();
            }
        }

        /* wait for new messages to arrive from the client */
        while (socket.isConnected())
        {
            try
            {
                if ((buff = dataInputStream.readUTF()) != null)
                {
                    /* New message has arrived from the client and the content of it is inside buff*/
                    consumer.consume(buff);     /* pass the message to the ClientDescriptor (consumer = ClientDescriptor) */
                }
            } catch (IOException e)
            {
                // we received IO Exception - need to remove the
                System.out.println("Connection was closed");
                removeConsumer(consumer);
                closeStreams();
                wasClosed = true;
                break;              /*Exit the while loop*/
            }
        }
    }