|
using | CrossRouteHandlerFunction = http::CrossRouteHandlerFunctionT< HttpRequestCtx, Response > |
| 过径路由处理函数类型 更多...
|
|
using | RouteHandlerFunction = http::RouteHandlerFunctionT< HttpRequestCtx, Response > |
| 普通路由处理函数类型 更多...
|
|
enum | ErrorCode { Err_Success,
Err_DoFileNotFound,
Err_WebMainNotFound,
Err_InfiniteRecursion
} |
| 执行do文件的错误码 更多...
|
|
using | CrossRouteHandlerFunction = CrossRouteHandlerFunctionT< HttpRequestCtx, Response > |
| 过径路由处理函数类型 更多...
|
|
using | RouteHandlerFunction = RouteHandlerFunctionT< HttpRequestCtx, Response > |
| 普通路由处理函数类型 更多...
|
|
using | CreateResponseHandlerFunction = std::function< Response *(Request &req, winux::SimplePointer< RspOutputMgr > outputMgr) > |
| 创建响应处理函数类型 更多...
|
|
using | ClientDataNotifyHandlerFunction = std::function< void(winux::SharedPointer< ClientCtx > clientCtxPtr, size_t readableSize) > |
| 客户数据通知,当Server::_isAutoReadData 为false时有效 更多...
|
|
using | ClientDataArrivedHandlerFunction = std::function< void(winux::SharedPointer< ClientCtx > clientCtxPtr, winux::Buffer &data) > |
| 客户数据到达,当Server::_isAutoReadData 为true时有效 更多...
|
|
using | CreateClientHandlerFunction = std::function< ClientCtx *(winux::uint64 clientId, winux::String const &clientEpStr, winux::SharedPointer< ip::tcp::Socket > clientSockPtr) > |
| 创建客户连接对象 更多...
|
|
using | CrossRouteHandlerFunction = CrossRouteHandlerFunctionT< http::Request, http::Response > |
|
using | RouteHandlerFunction = RouteHandlerFunctionT< http::Request, http::Response > |
|
using | WebMainHandlerFunction = std::function< void(winux::SharedPointer< http::Request > requestPtr, http::Response &rsp) > |
| WebMain逻辑处理函数类型 更多...
|
|
using | ExtensionHandlingHandlerFunction = std::function< bool(winux::String const &extName, winux::String const &fullPath, winux::SharedPointer< http::Request > requestPtr, http::Response &rsp) > |
| 特别扩展名处理函数类型 更多...
|
|
|
| HttpApp () |
| 构造函数0 更多...
|
|
| HttpApp (winux::ConfigureSettings const &settings, AppServerExternalData *externalData) |
| 构造函数1 更多...
|
|
| HttpApp (winux::ConfigureSettings const &settings, AppServerExternalData *externalData, eiennet::ip::EndPoint const &ep, int threadCount=4, int backlog=0, double serverWait=0.002, double verboseInterval=0.01, eiennet::VerboseOutputType verbose=eiennet::votConsole, int cacheLifeTime=86400) |
| 构造函数2 更多...
|
|
bool | init (winux::ConfigureSettings const &settings, AppServerExternalData *externalData) |
| 初始化1 更多...
|
|
bool | init (winux::ConfigureSettings const &settings, AppServerExternalData *externalData, eiennet::ip::EndPoint const &ep, int threadCount=4, int backlog=0, double serverWait=0.002, double verboseInterval=0.01, eiennet::VerboseOutputType verbose=eiennet::votConsole, int cacheLifeTime=86400) |
| 初始化2 更多...
|
|
void | crossRoute (winux::String const &method, winux::String const &path, CrossRouteHandlerFunction handler) |
| 注册过径路由处理器 更多...
|
|
void | route (winux::String const &method, winux::String const &path, RouteHandlerFunction handler) |
| 注册普通路由处理器 更多...
|
|
virtual int | run (void *runParam) override |
| 运行 更多...
|
|
| App () |
| 构造函数0 更多...
|
|
| App (winux::ConfigureSettings const &settings, AppServerExternalData *externalData) |
| 构造函数2 更多...
|
|
virtual | ~App () |
| 析构函数 更多...
|
|
bool | init (winux::ConfigureSettings const &settings, AppServerExternalData *externalData) |
| 初始化App对象 更多...
|
|
int | loadedDoFiles (winux::Mixed *arrDoFiles) const |
| 产品模式下,显示所有已经加载的do文件 更多...
|
|
bool | unloadDoFile (winux::String const &doFullPath) |
| 卸载指定的do文件 更多...
|
|
winux::DllLoader & | loadModule (winux::String const &modFullPath) |
| 加载一个模块,若已经加载则返回其引用. 更多...
|
|
int | loadedModules (winux::Mixed *arrModules) const |
| 显示已经加载的模块 更多...
|
|
bool | unloadModule (winux::String const &modFullPath) |
| 卸载一个模块 更多...
|
|
App & | loadEnv () |
| 加载可执行文件的环境变量 更多...
|
|
winux::String | dumpEnv () const |
| 倾泻出应用全部环境变量 更多...
|
|
virtual ErrorCode | execWebMain (winux::String const &doFullPath, Response *rsp, void *runParam, int *retCode) |
| 执行生成页面内容的过程,载入绝对路径doFullPath的do文件,并调用其WebMain()。 更多...
|
|
ErrorCode | importDoFile (winux::String const &doFullPath, Response *rsp, void *runParam, int *retCode, winux::String *errDetail) |
| import一个do文件,并把它的输出作为指定rsp的输出 更多...
|
|
void * | getParam () const |
| 取得可能在do中由setParam() 传递的参数 更多...
|
|
template<typename _Ty > |
_Ty | getParam () const |
| 取得可能在do中由setParam() 传递的参数 更多...
|
|
void | setParam (void *param) |
| 设置可能在do中传递的参数 更多...
|
|
void * | getRunParam () const |
| 取得从run() 传进的参数 更多...
|
|
template<typename _Ty > |
_Ty | getRunParam () const |
| 取得从run() 传进的参数 更多...
|
|
AppServerExternalData * | getExternalData () |
| 取得外部定义的相关数据 更多...
|
|
void | setExternalData (AppServerExternalData *data) |
| 设置外部定义的相关数据 更多...
|
|
SessionServer * | getSessServ () |
| 取得SessionServer * 更多...
|
|
void | setSessServ (SessionServer *sessServ) |
| 设置SessionServer * 更多...
|
|
| HttpServer () |
| 构造函数0 更多...
|
|
| HttpServer (winux::ConfigureSettings const &settings) |
| 构造函数1 更多...
|
|
| HttpServer (winux::ConfigureSettings const &settings, eiennet::ip::EndPoint const &ep, int threadCount=4, int backlog=0, double serverWait=0.002, double verboseInterval=0.01, eiennet::VerboseOutputType verbose=eiennet::votConsole, int cacheLifeTime=86400) |
| 构造函数2 更多...
|
|
bool | init (winux::ConfigureSettings const &settings) |
| 初始化1 更多...
|
|
bool | init (winux::ConfigureSettings const &settings, eiennet::ip::EndPoint const &ep, int threadCount=4, int backlog=0, double serverWait=0.002, double verboseInterval=0.01, eiennet::VerboseOutputType verbose=eiennet::votConsole, int cacheLifeTime=86400) |
| 初始化2 更多...
|
|
void | crossRoute (winux::String const &method, winux::String const &path, CrossRouteHandlerFunction handler) |
| 注册过径路由处理器 更多...
|
|
void | route (winux::String const &method, winux::String const &path, RouteHandlerFunction handler) |
| 注册普通路由处理器 更多...
|
|
void | onCreateResponseHandler (CreateResponseHandlerFunction handler) |
|
| Server () |
| 构造函数0,不会启动服务,必须手动调用startup() 更多...
|
|
| Server (bool autoReadData, ip::EndPoint const &ep, int threadCount=4, int backlog=0, double serverWait=0.002, double verboseInterval=0.01, VerboseOutputType verbose=votConsole) |
| 构造函数1,会启动服务 更多...
|
|
virtual | ~Server () |
|
bool | startup (bool autoReadData, ip::EndPoint const &ep, int threadCount=4, int backlog=0, double serverWait=0.002, double verboseInterval=0.01, VerboseOutputType verbose=votConsole) |
| 启动服务器 更多...
|
|
void | stop (bool b=true) |
| 是否停止服务运行 更多...
|
|
size_t | getClientsCount () const |
| 获取客户连接数 更多...
|
|
void | removeClient (winux::uint64 clientId) |
| 移除客户连接 更多...
|
|
void | onClientDataNotifyHandler (ClientDataNotifyHandlerFunction handler) |
|
void | onClientDataArrivedHandler (ClientDataArrivedHandlerFunction handler) |
|
void | onCreateClientHandler (CreateClientHandlerFunction handler) |
|
| UrlRouter (http::HttpServerConfig *httpConfig=nullptr) |
| 构造函数 更多...
|
|
virtual | ~UrlRouter () |
| 析构函数 更多...
|
|
bool | init (http::HttpServerConfig *httpConfig) |
| 初始化 更多...
|
|
void | crossRoute (winux::String const &method, winux::String const &path, CrossRouteHandlerFunction handler) |
| 注册过径路由处理器 更多...
|
|
void | route (winux::String const &method, winux::String const &path, RouteHandlerFunction handler) |
| 注册普通路由处理器 更多...
|
|
void | onWebMainHandler (WebMainHandlerFunction handler) |
|
void | onExtensionHandlingHandler (ExtensionHandlingHandlerFunction handler) |
|
|
virtual eiennet::ClientCtx * | onCreateClient (winux::uint64 clientId, winux::String const &clientEpStr, winux::SharedPointer< eiennet::ip::tcp::Socket > clientSockPtr) override |
|
virtual http::Response * | onCreateResponse (http::Request &req, winux::SimplePointer< http::RspOutputMgr > outputMgr) override |
|
virtual bool | _beginHttpRequest (winux::SharedPointer< http::HttpRequestCtx > requestCtxPtr, http::UrlPathPartData *urlData) override |
| 开始HTTP请求处理,初始化一些数据 更多...
|
|
virtual bool | onExtensionHandling (winux::String const &extName, winux::String const &fullPath, winux::SharedPointer< http::Request > requestPtr, http::Response &rsp) override |
|
void | _clearModules () |
| 清空已加载的模块和WebMain函数 更多...
|
|
ErrorCode | _importDoFileDevelopment (winux::String const &doFullPath, Response *rsp, void *runParam, int *retCode, winux::String *errDetail) |
| 开发模式下,导入do文件并运行 更多...
|
|
ErrorCode | _importDoFileProduction (winux::String const &doFullPath, Response *rsp, void *runParam, int *retCode, winux::String *errDetail) |
| 产品模式下,导入do文件并运行 更多...
|
|
virtual void | onClientDataArrived (winux::SharedPointer< eiennet::ClientCtx > clientCtxPtr, winux::Buffer &data) override |
|
void | _onHttpRequestInternal (winux::SharedPointer< HttpRequestCtx > requestCtxPtr) |
| 处理一次HTTP请求 更多...
|
|
virtual void | _endHttpRequest (winux::SharedPointer< http::HttpRequestCtx > requestCtxPtr) |
| HTTP请求处理完,进行一些收尾 更多...
|
|
virtual bool | _beginRouting (winux::SharedPointer< http::HttpRequestCtx > requestCtxPtr, http::UrlPathPartData const &urlData, http::Response &rsp) |
| 开始路由。返回false表示不路由 更多...
|
|
virtual void | _endRouting (winux::SharedPointer< http::HttpRequestCtx > requestCtxPtr, http::UrlPathPartData const &urlData, http::Response &rsp) |
| 结束路由 更多...
|
|
virtual void | _whatNextTask (winux::SharedPointer< HttpRequestCtx > requestCtxPtr) |
| 下一次要做的任务 更多...
|
|
virtual void | _doTask (winux::SharedPointer< http::HttpRequestCtx > requestCtxPtr) |
| 执行客户任务 更多...
|
|
void | _doRecvRequestHeaderTask (winux::SharedPointer< HttpRequestCtx > requestCtxPtr) |
| 接收请求头任务 更多...
|
|
void | _doRecvRequestBodyTask (winux::SharedPointer< HttpRequestCtx > requestCtxPtr) |
| 接收请求体任务 更多...
|
|
virtual bool | _canAddClient (ClientCtx *clientCtx) |
| 是否添加一个客户连接。返回true添加,返回false不添加 更多...
|
|
bool | _addClient (ip::EndPoint const &clientEp, winux::SharedPointer< ip::tcp::Socket > clientSockPtr, winux::SharedPointer< ClientCtx > **ppClientCtxPtr) |
| 添加一个客户连接,会触发调用onCreateClient() 创建客户场景对象,会调用_canAddClient() 判断是否添加到服务器客户列表 更多...
|
|
template<typename _Fx , typename... _ArgType> |
void | _postTask (winux::SharedPointer< ClientCtx > clientCtxPtr, _Fx fn, _ArgType &&...arg) |
| 往线程池投递任务 更多...
|
|
virtual void | onClientDataNotify (winux::SharedPointer< ClientCtx > clientCtxPtr, size_t readableSize) |
|
virtual void | routing (winux::SharedPointer< http::Request > requestPtr, http::UrlPathPartData const &urlData, http::Response &rsp) |
| 路由处理 更多...
|
|
virtual void | onWebMain (winux::SharedPointer< http::Request > requestPtr, http::Response &rsp) |
|