| 
    fastdo
    0.5.12
    
   | 
 
http服务器 更多...
#include <eiennet_httpserv.hpp>


Public 类型 | |
| using | ResponseHandlerFunction = std::function< void(eiennet::HttpServer::ClientCtxSharedPointer &clientCtxPtr, http::Header const &reqHdr, http::Url const &url, http::Header &rspHdr, std::ostream &rspOut) > | 
  Public 类型 继承自 eiennet::Server< HttpClientCtx > | |
| using | ClientCtxSharedPointer = winux::SharedPointer< HttpClientCtx > | 
| using | StartupHandlerFunction = std::function< void(ClientCtxSharedPointer clientCtxPtr) > | 
Public 成员函数 | |
| HttpServer (HttpServerConfig const &confObj) | |
| 构造函数1,需要一个配置对象  更多... | |
| HttpServer (winux::String const &serverIp, winux::ushort port, int threadCount=4, int listenBacklog=10, double durationSec=0.1) | |
| 构造函数2  更多... | |
| void | setHandler (winux::String const &urlPath, ResponseHandlerFunction handler) | 
  Public 成员函数 继承自 eiennet::Server< HttpClientCtx > | |
| Server (ip::EndPoint const &ep, int threadCount=4, int backlog=0, double durationSec=0.1) | |
| 构造函数1  更多... | |
| virtual | ~Server () | 
| virtual int | run () | 
| size_t | getClientsCount () const | 
| void | onStartupHandler (StartupHandlerFunction handler) | 
| void | removeClient (winux::uint64 clientId) | 
Public 属性 | |
| HttpServerConfig const | config | 
| 配置参数  更多... | |
友元 | |
| class | HttpClientCtx | 
额外继承的成员函数 | |
  Protected 成员函数 继承自 eiennet::Server< HttpClientCtx > | |
| ClientCtxSharedPointer & | _addClient (ip::EndPoint const &clientEp, winux::SharedPointer< ip::tcp::Socket > clientSockPtr) | 
  Protected 属性 继承自 eiennet::Server< HttpClientCtx > | |
| winux::uint64 | _cumulativeClientId | 
| bool | _stop | 
| winux::ThreadPool | _pool | 
| winux::Mutex | _mtxServer | 
| ip::tcp::Socket | _servSock | 
| std::map< winux::uint64, ClientCtxSharedPointer > | _clients | 
| StartupHandlerFunction | _startupHandler | 
http服务器
在文件 eiennet_httpserv.hpp 第 55 行定义.
| using eiennet::HttpServer::ResponseHandlerFunction = std::function< void ( eiennet::HttpServer::ClientCtxSharedPointer & clientCtxPtr, http::Header const & reqHdr, http::Url const & url, http::Header & rspHdr, std::ostream & rspOut ) > | 
在文件 eiennet_httpserv.hpp 第 61 行定义.
| eiennet::HttpServer::HttpServer | ( | HttpServerConfig const & | confObj | ) | 
构造函数1,需要一个配置对象
| eiennet::HttpServer::HttpServer | ( | winux::String const & | serverIp, | 
| winux::ushort | port, | ||
| int | threadCount = 4,  | 
        ||
| int | listenBacklog = 10,  | 
        ||
| double | durationSec = 0.1  | 
        ||
| ) | 
构造函数2
      
  | 
  inline | 
在文件 eiennet_httpserv.hpp 第 68 行定义.
      
  | 
  friend | 
在文件 eiennet_httpserv.hpp 第 88 行定义.
| HttpServerConfig const eiennet::HttpServer::config | 
配置参数
在文件 eiennet_httpserv.hpp 第 58 行定义.