acl  3.5.3.0
acl::http_server类 参考

#include <http_server.hpp>

+ 类 acl::http_server 继承关系图:
+ acl::http_server 的协作图:

Public 成员函数

 http_server (const char *addr="127.0.0.1|6379", bool use_redis=true)
 
 ~http_server (void)
 
http_serverGet (const char *path, http_handler_t fn)
 
http_serverPost (const char *path, http_handler_t fn)
 
http_serverHead (const char *path, http_handler_t fn)
 
http_serverPut (const char *path, http_handler_t fn)
 
http_serverPatch (const char *path, http_handler_t fn)
 
http_serverConnect (const char *path, http_handler_t fn)
 
http_serverPurge (const char *path, http_handler_t fn)
 
http_serverDelete (const char *path, http_handler_t fn)
 
http_serverOptions (const char *path, http_handler_t fn)
 
http_serverPropfind (const char *path, http_handler_t fn)
 
http_serverWebsocket (const char *path, http_handler_t fn)
 
http_serverUnknown (const char *path, http_handler_t fn)
 
http_serverError (const char *path, http_handler_t fn)
 
http_serverbefore_proc_jail (proc_jail_t fn)
 
http_serveron_proc_init (proc_init_t fn)
 
http_serveron_proc_exit (proc_exit_t fn)
 
http_serveron_proc_sighup (proc_sighup_t fn)
 
http_serveron_thread_init (thread_init_t fn)
 
http_serveron_thread_accept (thread_accept_t fn)
 
- Public 成员函数 继承自 acl::http_server_impl
 http_server_impl (const char *addr, bool use_redis)
 
virtual ~http_server_impl (void)
 
- Public 成员函数 继承自 acl::master_fiber
void run_daemon (int argc, char **argv)
 
bool run_alone (const char *addrs, const char *path=NULL)
 
const char * get_conf_path (void) const
 
- Public 成员函数 继承自 acl::master_base
master_baseset_cfg_bool (master_bool_tbl *table)
 
master_baseset_cfg_int (master_int_tbl *table)
 
master_baseset_cfg_int64 (master_int64_tbl *table)
 
master_baseset_cfg_str (master_str_tbl *table)
 
bool daemon_mode (void) const
 
bool proc_set_timer (event_timer *timer)
 
void proc_del_timer (event_timer *timer)
 

额外继承的成员函数

- Protected 成员函数 继承自 acl::http_server_impl
void Service (int type, const char *path, http_handler_t fn)
 
void on_accept (socket_stream &conn)
 
void proc_pre_jail (void)
 
void proc_on_init (void)
 
void proc_on_exit (void)
 
bool proc_on_sighup (acl::string &s)
 
void thread_on_init (void)
 
- Protected 成员函数 继承自 acl::master_fiber
 master_fiber ()
 
virtual ~master_fiber ()
 
- Protected 成员函数 继承自 acl::master_base
 master_base ()
 
virtual ~master_base ()
 
virtual void proc_on_listen (server_socket &ss)
 
void set_event (ACL_EVENT *event)
 
ACL_EVENTget_event (void) const
 
- Protected 成员函数 继承自 acl::acl::noncopyable
 noncopyable ()
 
 ~noncopyable ()
 
- Protected 属性 继承自 acl::http_server_impl
redis_client_clusterredis_ = nullptr
 
proc_jail_t proc_jail_ = nullptr
 
proc_init_t proc_init_ = nullptr
 
proc_exit_t proc_exit_ = nullptr
 
proc_sighup_t proc_sighup_ = nullptr
 
thread_init_t thread_init_ = nullptr
 
thread_accept_t thread_accept_ = nullptr
 
http_handlers_t handlers_ [http_handler_max]
 
- Protected 属性 继承自 acl::master_base
bool daemon_mode_
 
bool proc_inited_
 
std::vector< server_socket * > servers_
 
master_conf conf_
 

详细描述

在文件 http_server.hpp8 行定义.

构造及析构函数说明

◆ http_server()

acl::http_server::http_server ( const char *  addr = "127.0.0.1|6379",
bool  use_redis = true 
)
inline

在文件 http_server.hpp10 行定义.

11  : http_server_impl(addr, use_redis) {}
http_server_impl(const char *addr, bool use_redis)

◆ ~http_server()

acl::http_server::~http_server ( void  )
inline

在文件 http_server.hpp12 行定义.

12 {}

成员函数说明

◆ before_proc_jail()

http_server& acl::http_server::before_proc_jail ( proc_jail_t  fn)
inline

在文件 http_server.hpp81 行定义.

81  {
82  this->proc_jail_ = fn;
83  return *this;
84  }

引用了 acl::http_server_impl::proc_jail_.

◆ Connect()

http_server& acl::http_server::Connect ( const char *  path,
http_handler_t  fn 
)
inline

在文件 http_server.hpp40 行定义.

40  {
41  this->Service(http_handler_connect, path, fn);
42  return *this;
43  }
void Service(int type, const char *path, http_handler_t fn)

引用了 acl::http_handler_connect , 以及 acl::http_server_impl::Service().

+ 函数调用图:

◆ Delete()

http_server& acl::http_server::Delete ( const char *  path,
http_handler_t  fn 
)
inline

在文件 http_server.hpp50 行定义.

50  {
51  this->Service(http_handler_delete, path, fn);
52  return *this;
53  }
void Service(int type, const char *path, http_handler_t fn)

引用了 acl::http_handler_delete , 以及 acl::http_server_impl::Service().

+ 函数调用图:

◆ Error()

http_server& acl::http_server::Error ( const char *  path,
http_handler_t  fn 
)
inline

在文件 http_server.hpp75 行定义.

75  {
76  this->Service(http_handler_error, path, fn);
77  return *this;
78  }
void Service(int type, const char *path, http_handler_t fn)

引用了 acl::http_handler_error , 以及 acl::http_server_impl::Service().

+ 函数调用图:

◆ Get()

http_server& acl::http_server::Get ( const char *  path,
http_handler_t  fn 
)
inline

在文件 http_server.hpp15 行定义.

15  {
16  this->Service(http_handler_get, path, fn);
17  return *this;
18  }
void Service(int type, const char *path, http_handler_t fn)

引用了 acl::http_handler_get , 以及 acl::http_server_impl::Service().

+ 函数调用图:

◆ Head()

http_server& acl::http_server::Head ( const char *  path,
http_handler_t  fn 
)
inline

在文件 http_server.hpp25 行定义.

25  {
26  this->Service(http_handler_head, path, fn);
27  return *this;
28  }
void Service(int type, const char *path, http_handler_t fn)

引用了 acl::http_handler_head , 以及 acl::http_server_impl::Service().

+ 函数调用图:

◆ on_proc_exit()

http_server& acl::http_server::on_proc_exit ( proc_exit_t  fn)
inline

在文件 http_server.hpp91 行定义.

91  {
92  this->proc_exit_ = fn;
93  return *this;
94  }

引用了 acl::http_server_impl::proc_exit_.

◆ on_proc_init()

http_server& acl::http_server::on_proc_init ( proc_init_t  fn)
inline

在文件 http_server.hpp86 行定义.

86  {
87  this->proc_init_ = fn;
88  return *this;
89  }

引用了 acl::http_server_impl::proc_init_.

◆ on_proc_sighup()

http_server& acl::http_server::on_proc_sighup ( proc_sighup_t  fn)
inline

在文件 http_server.hpp96 行定义.

96  {
97  this->proc_sighup_ = fn;
98  return *this;
99  }

引用了 acl::http_server_impl::proc_sighup_.

◆ on_thread_accept()

http_server& acl::http_server::on_thread_accept ( thread_accept_t  fn)
inline

在文件 http_server.hpp106 行定义.

106  {
107  this->thread_accept_ = fn;
108  return *this;
109  }
thread_accept_t thread_accept_

引用了 acl::http_server_impl::thread_accept_.

◆ on_thread_init()

http_server& acl::http_server::on_thread_init ( thread_init_t  fn)
inline

在文件 http_server.hpp101 行定义.

101  {
102  this->thread_init_ = fn;
103  return *this;
104  }

引用了 acl::http_server_impl::thread_init_.

◆ Options()

http_server& acl::http_server::Options ( const char *  path,
http_handler_t  fn 
)
inline

在文件 http_server.hpp55 行定义.

55  {
56  this->Service(http_handler_options, path, fn);
57  return *this;
58  }
void Service(int type, const char *path, http_handler_t fn)

引用了 acl::http_handler_options , 以及 acl::http_server_impl::Service().

+ 函数调用图:

◆ Patch()

http_server& acl::http_server::Patch ( const char *  path,
http_handler_t  fn 
)
inline

在文件 http_server.hpp35 行定义.

35  {
36  this->Service(http_handler_patch, path, fn);
37  return *this;
38  }
void Service(int type, const char *path, http_handler_t fn)

引用了 acl::http_handler_patch , 以及 acl::http_server_impl::Service().

+ 函数调用图:

◆ Post()

http_server& acl::http_server::Post ( const char *  path,
http_handler_t  fn 
)
inline

在文件 http_server.hpp20 行定义.

20  {
21  this->Service(http_handler_post, path, fn);
22  return *this;
23  }
void Service(int type, const char *path, http_handler_t fn)

引用了 acl::http_handler_post , 以及 acl::http_server_impl::Service().

+ 函数调用图:

◆ Propfind()

http_server& acl::http_server::Propfind ( const char *  path,
http_handler_t  fn 
)
inline

在文件 http_server.hpp60 行定义.

60  {
61  this->Service(http_handler_profind, path, fn);
62  return *this;
63  }
void Service(int type, const char *path, http_handler_t fn)

引用了 acl::http_handler_profind , 以及 acl::http_server_impl::Service().

+ 函数调用图:

◆ Purge()

http_server& acl::http_server::Purge ( const char *  path,
http_handler_t  fn 
)
inline

在文件 http_server.hpp45 行定义.

45  {
46  this->Service(http_handler_purge, path, fn);
47  return *this;
48  }
void Service(int type, const char *path, http_handler_t fn)

引用了 acl::http_handler_purge , 以及 acl::http_server_impl::Service().

+ 函数调用图:

◆ Put()

http_server& acl::http_server::Put ( const char *  path,
http_handler_t  fn 
)
inline

在文件 http_server.hpp30 行定义.

30  {
31  this->Service(http_handler_put, path, fn);
32  return *this;
33  }
void Service(int type, const char *path, http_handler_t fn)

引用了 acl::http_handler_put , 以及 acl::http_server_impl::Service().

+ 函数调用图:

◆ Unknown()

http_server& acl::http_server::Unknown ( const char *  path,
http_handler_t  fn 
)
inline

在文件 http_server.hpp70 行定义.

70  {
71  this->Service(http_handler_unknown, path, fn);
72  return *this;
73  }
void Service(int type, const char *path, http_handler_t fn)

引用了 acl::http_handler_unknown , 以及 acl::http_server_impl::Service().

+ 函数调用图:

◆ Websocket()

http_server& acl::http_server::Websocket ( const char *  path,
http_handler_t  fn 
)
inline

在文件 http_server.hpp65 行定义.

65  {
66  this->Service(http_handler_websocket, path, fn);
67  return *this;
68  }
void Service(int type, const char *path, http_handler_t fn)

引用了 acl::http_handler_websocket , 以及 acl::http_server_impl::Service().

+ 函数调用图:

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