3 #include "../master_fiber.hpp" 4 #include "../http_servlet.hpp" 5 #include "../go_fiber.hpp" 37 if (buf[buf.
size() - 1] !=
'/') {
71 while (servlet.
doRun()) {}
http_server_impl(const char *addr, bool use_redis)
std::function< void()> proc_jail_t
std::function< bool(HttpRequest &, HttpResponse &)> http_handler_t
void on_accept(socket_stream &conn)
http_handlers_t handlers_[http_handler_max]
std::function< void()> thread_init_t
std::function< void()> proc_init_t
std::map< acl::string, http_handler_t > http_handlers_t
thread_init_t thread_init_
redis_client_cluster * redis_
thread_accept_t thread_accept_
void Service(int type, const char *path, http_handler_t fn)
HttpServlet & setLocalCharset(const char *charset)
void thread_on_init(void)
proc_sighup_t proc_sighup_
void bind_thread(bool yes)
void init(const char *default_addr, const char *addr_list, size_t count, int conn_timeout=30, int rw_timeout=30)
std::function< bool(acl::socket_stream &)> thread_accept_t
bool proc_on_sighup(acl::string &s)
std::function< bool(acl::string &)> proc_sighup_t
virtual ~http_server_impl(void)
std::function< void()> proc_exit_t