fastdo  0.5.12
fcgi::Response类 参考

代表一个客户响应 更多...

#include <fcgiplus.hpp>

fcgi::Response 的协作图:

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 属性

Requestreq
 Request对象的引用 更多...
 
http::Headerheader
 表示头部 更多...
 

详细描述

代表一个客户响应

在文件 fcgiplus.hpp246 行定义.

构造及析构函数说明

fcgi::Response::Response ( Request request)
explicit
fcgi::Response::~Response ( )

成员函数说明

winux::String fcgi::Response::convFrom ( winux::String const &  str) const
inline

在文件 fcgiplus.hpp267 行定义.

函数调用图:

winux::String fcgi::Response::convTo ( winux::String const &  str) const
inline

在文件 fcgiplus.hpp268 行定义.

函数调用图:

void fcgi::Response::echo ( winux::String const &  str)
winux::String fcgi::Response::getCharset ( ) const
inline

在文件 fcgiplus.hpp284 行定义.

函数调用图:

winux::String fcgi::Response::getLocalEncoding ( ) const
inline

在文件 fcgiplus.hpp264 行定义.

函数调用图:

winux::String fcgi::Response::getMimeType ( ) const
inline

在文件 fcgiplus.hpp271 行定义.

winux::String fcgi::Response::getTargetEncoding ( ) const
inline

在文件 fcgiplus.hpp265 行定义.

函数调用图:

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,
  ... 
)
void fcgi::Response::setAutoContentType ( bool  autoContentType = true)
inline

是否自动设置Content-Type

Response在即将完成输出前会配合MIME和目标编码自动设置Content-Type
如果MIME不是文本,则不会设置charset部分

在文件 fcgiplus.hpp277 行定义.

void fcgi::Response::setCharset ( winux::String const &  charset)
inline

设置charset,即设置输出目标编码

若设置了,则内部的编码转换功能会开启,由local编码转换到target编码。
如果只是想告诉浏览器(响应头)编码是什么,则应该直接设置header。

在文件 fcgiplus.hpp283 行定义.

函数调用图:

void fcgi::Response::setMimeType ( winux::String const &  mime)
inline

设置mime

在文件 fcgiplus.hpp270 行定义.

void fcgi::Response::write ( void const *  data,
int  size 
)
void fcgi::Response::write ( winux::Buffer const &  buf)

类成员变量说明

http::Header& fcgi::Response::header

表示头部

在文件 fcgiplus.hpp254 行定义.

Request& fcgi::Response::req

Request对象的引用

在文件 fcgiplus.hpp253 行定义.


该类的文档由以下文件生成: