@Override
    public void run() {
        try (Scanner in = new Scanner(System.in)){
            boolean done = false;
            while (!done && in.hasNextLine()){
                String msg = in.nextLine();

                sendMSG(msg.getBytes(), msg.getBytes().length, address, port);

                if(msg.trim().equals(Constants.SHUTDOWN_MESSAGE))
                    done = true;
            }
        } finally {
            socket.close();
        }
    }