| 
    fastdo
    0.5.12
    
   | 
 
代表一个客户响应 更多...
#include <fcgiplus.hpp>

Public 成员函数 | |
| Response (Request &request) | |
| ~Response () | |
| void | echo (winux::String const &str) | 
| void | write (void const *data, int size) | 
| void | write (winux::Buffer const &buf) | 
| void | printf (char const *format,...) | 
| winux::String | getLocalEncoding () const | 
| winux::String | getTargetEncoding () const | 
| winux::String | convFrom (winux::String const &str) const | 
| winux::String | convTo (winux::String const &str) const | 
| void | setMimeType (winux::String const &mime) | 
| 设置mime  更多... | |
| winux::String | getMimeType () const | 
| void | setAutoContentType (bool autoContentType=true) | 
| 是否自动设置Content-Type  更多... | |
| void | setCharset (winux::String const &charset) | 
| 设置charset,即设置输出目标编码  更多... | |
| winux::String | getCharset () const | 
| void | import (winux::String const &doFile, void *runParam=NULL, int *retCode=NULL) | 
| import一个do文件,并把它的输出作为自己的输出,若错误则显示错误  更多... | |
Public 属性 | |
| Request & | req | 
| Request对象的引用  更多... | |
| http::Header & | header | 
| 表示头部  更多... | |
代表一个客户响应
在文件 fcgiplus.hpp 第 246 行定义.
      
  | 
  explicit | 
| fcgi::Response::~Response | ( | ) | 
      
  | 
  inline | 
      
  | 
  inline | 
| void fcgi::Response::echo | ( | winux::String const & | str | ) | 
      
  | 
  inline | 
      
  | 
  inline | 
      
  | 
  inline | 
在文件 fcgiplus.hpp 第 271 行定义.
      
  | 
  inline | 
| void fcgi::Response::import | ( | winux::String const & | doFile, | 
| void * | runParam = NULL,  | 
        ||
| int * | retCode = NULL  | 
        ||
| ) | 
import一个do文件,并把它的输出作为自己的输出,若错误则显示错误
| doFile | 文件路径 | 
| runParam | 应传入WebMain()传来的runParam,如果是NULL,将从fcgiApp取得runParam | 
| retCode | 表示导入do的WebMain()返回代码,为NULL则忽略此值 | 
| void fcgi::Response::printf | ( | char const * | format, | 
| ... | |||
| ) | 
      
  | 
  inline | 
是否自动设置Content-Type
Response在即将完成输出前会配合MIME和目标编码自动设置Content-Type
如果MIME不是文本,则不会设置charset部分 
在文件 fcgiplus.hpp 第 277 行定义.
      
  | 
  inline | 
设置charset,即设置输出目标编码
若设置了,则内部的编码转换功能会开启,由local编码转换到target编码。
如果只是想告诉浏览器(响应头)编码是什么,则应该直接设置header。 
在文件 fcgiplus.hpp 第 283 行定义.

      
  | 
  inline | 
设置mime
在文件 fcgiplus.hpp 第 270 行定义.
| void fcgi::Response::write | ( | void const * | data, | 
| int | size | ||
| ) | 
| void fcgi::Response::write | ( | winux::Buffer const & | buf | ) | 
| http::Header& fcgi::Response::header | 
表示头部
在文件 fcgiplus.hpp 第 254 行定义.
| Request& fcgi::Response::req | 
Request对象的引用
在文件 fcgiplus.hpp 第 253 行定义.