public String receive()
    {
        String msg = input.nextLine();
        if (msg.equals(ProtocolStrings.STOP))
        {
            try
            {
                socket.close();
            } catch (IOException ex)
            {
                Logger.getLogger(ChatClient.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        return msg;
    }