|
fastdo
0.6.16
|
HTTP客户请求场景 更多...
#include <http_HttpRequestCtx.hpp>


Public 类型 | |
| enum | TaskType { ttNone, ttRecvRequestHeader, ttRecvRequestBody, ttNextStart } |
| 任务类型 更多... | |
Public 成员函数 | |
| HttpRequestCtx (HttpServer *server, winux::uint64 clientId, winux::String const &clientEpStr, winux::SharedPointer< eiennet::ip::tcp::Socket > clientSockPtr) | |
| virtual bool | processData (http::UrlPathPartData *urlData) override |
| 每次请求时处理environVars/get/post/cookies数据 更多... | |
| virtual void | cleanup () override |
| 每次请求后清理一些数据 更多... | |
Public 成员函数 继承自 eiennet::ClientCtx | |
| ClientCtx (Server *server, winux::uint64 clientId, winux::String const &clientEpStr, winux::SharedPointer< eiennet::ip::tcp::Socket > clientSockPtr) | |
| virtual | ~ClientCtx () |
| winux::String | getStamp () const |
| 客户端戳 更多... | |
Public 成员函数 继承自 http::Request | |
| Request () | |
| virtual | ~Request () |
| virtual winux::String | dumpEnv () const |
| 倾泻出全部请求环境变量 更多... | |
| winux::String const & | operator[] (winux::String const &name) const |
| 获取环境变量 更多... | |
Public 属性 | |
| eiennet::DataRecvSendCtx | forClient |
| 接收数据的一些中间变量 更多... | |
| http::Url | url |
| 请求的URL 更多... | |
| bool | hasHeader |
| 标记是否读取到了请求头,这个用来避免"请求体"数据包含有“\r\n\r\n”从而导致请求头错误 更多... | |
| size_t | requestContentLength |
| 请求包含的请求体内容大小 更多... | |
| int | curTaskType |
| 当前的任务类型 更多... | |
Public 属性 继承自 eiennet::ClientCtx | |
| Server * | server |
| 服务器 更多... | |
| winux::uint64 | clientId |
| 客户Id 更多... | |
| winux::String | clientEpStr |
| 客户终端字符串 更多... | |
| winux::SharedPointer< ip::tcp::Socket > | clientSockPtr |
| 客户套接字 更多... | |
| bool | canRemove |
| 是否标记为可以移除 更多... | |
| bool | processingEvent |
| 是否事件处理中,保证同一个客户连接仅投递一个事件到线程池中 更多... | |
Public 属性 继承自 http::Request | |
| http::Header | header |
| 请求头 更多... | |
| winux::AnsiString | body |
| 请求体 更多... | |
| winux::StringStringMap | environVars |
| 环境变量 更多... | |
| http::Cookies | cookies |
| Cookie变量 read/write. 更多... | |
| http::Vars | get |
| GET变量 readonly. 更多... | |
| http::Vars | post |
| POST变量 readonly. 更多... | |
Protected 属性 | |
| winux::StringArray | _arrUploadTmpFiles |
HTTP客户请求场景
在文件 http_HttpRequestCtx.hpp 第 8 行定义.
任务类型
| 枚举值 | |
|---|---|
| ttNone |
什么都不做 |
| ttRecvRequestHeader |
接收请求头 |
| ttRecvRequestBody |
接收请求体 |
| ttNextStart |
用于下一个任务类型的起始枚举值 |
在文件 http_HttpRequestCtx.hpp 第 14 行定义.
| http::HttpRequestCtx::HttpRequestCtx | ( | HttpServer * | server, |
| winux::uint64 | clientId, | ||
| winux::String const & | clientEpStr, | ||
| winux::SharedPointer< eiennet::ip::tcp::Socket > | clientSockPtr | ||
| ) |
|
overridevirtual |
|
overridevirtual |
| eiennet::DataRecvSendCtx http::HttpRequestCtx::forClient |
接收数据的一些中间变量
在文件 http_HttpRequestCtx.hpp 第 22 行定义.
| http::Url http::HttpRequestCtx::url |
请求的URL
在文件 http_HttpRequestCtx.hpp 第 23 行定义.
| bool http::HttpRequestCtx::hasHeader |
标记是否读取到了请求头,这个用来避免"请求体"数据包含有“\r\n\r\n”从而导致请求头错误
在文件 http_HttpRequestCtx.hpp 第 25 行定义.
| size_t http::HttpRequestCtx::requestContentLength |
请求包含的请求体内容大小
在文件 http_HttpRequestCtx.hpp 第 26 行定义.
| int http::HttpRequestCtx::curTaskType |
当前的任务类型
在文件 http_HttpRequestCtx.hpp 第 28 行定义.
|
protected |
在文件 http_HttpRequestCtx.hpp 第 34 行定义.