2019-07-28 10:31:56 +08:00
|
|
|
|
#pragma once
|
2014-11-19 00:25:21 +08:00
|
|
|
|
|
2020-06-29 17:17:56 +08:00
|
|
|
|
class http_service;
|
2014-11-19 00:25:21 +08:00
|
|
|
|
|
2020-06-29 17:17:56 +08:00
|
|
|
|
class master_service : public acl::master_proc
|
|
|
|
|
{
|
2020-06-29 14:34:16 +08:00
|
|
|
|
public:
|
2020-06-29 17:17:56 +08:00
|
|
|
|
master_service(void);
|
|
|
|
|
~master_service(void);
|
2014-11-19 00:25:21 +08:00
|
|
|
|
|
2020-06-29 17:17:56 +08:00
|
|
|
|
http_service& get_service(void) const;
|
2014-11-19 00:25:21 +08:00
|
|
|
|
|
|
|
|
|
public:
|
2020-06-29 14:34:16 +08:00
|
|
|
|
/**
|
|
|
|
|
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD> CGI <EFBFBD><EFBFBD>ʽ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
*/
|
|
|
|
|
void do_cgi(void);
|
2014-11-19 00:25:21 +08:00
|
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
/**
|
2016-12-03 20:09:21 +08:00
|
|
|
|
* @override
|
2019-07-28 10:31:56 +08:00
|
|
|
|
* <EFBFBD>麯<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>յ<EFBFBD>һ<EFBFBD><EFBFBD><EFBFBD>ͻ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD><EFBFBD>ô˺<EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
* @param stream {aio_socket_stream*} <EFBFBD>½<EFBFBD><EFBFBD>յ<EFBFBD><EFBFBD>Ŀͻ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>첽<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
* ע<EFBFBD><EFBFBD><EFBFBD>ú<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>غ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӽ<EFBFBD><EFBFBD>ᱻ<EFBFBD>رգ<EFBFBD><EFBFBD>û<EFBFBD><EFBFBD><EFBFBD>Ӧ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>رո<EFBFBD><EFBFBD><EFBFBD>
|
2014-11-19 00:25:21 +08:00
|
|
|
|
*/
|
2016-12-03 20:09:21 +08:00
|
|
|
|
void on_accept(acl::socket_stream* stream);
|
2014-11-19 00:25:21 +08:00
|
|
|
|
|
|
|
|
|
/**
|
2016-12-03 20:09:21 +08:00
|
|
|
|
* @override
|
2019-07-28 10:31:56 +08:00
|
|
|
|
* <EFBFBD>ڽ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ÿ<EFBFBD>ɹ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ص<EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ñ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
* @param ss {acl::server_socket&} <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2016-12-03 20:09:21 +08:00
|
|
|
|
*/
|
|
|
|
|
void proc_on_listen(acl::server_socket& ss);
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @override
|
2019-07-28 10:31:56 +08:00
|
|
|
|
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>л<EFBFBD><EFBFBD>û<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݺ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>õĻص<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˺<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
* <EFBFBD><EFBFBD>Ȩ<EFBFBD><EFBFBD>Ϊ<EFBFBD><EFBFBD>ͨ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2014-11-19 00:25:21 +08:00
|
|
|
|
*/
|
2019-07-20 16:14:09 +08:00
|
|
|
|
void proc_on_init(void);
|
2014-11-19 00:25:21 +08:00
|
|
|
|
|
|
|
|
|
/**
|
2016-12-03 20:09:21 +08:00
|
|
|
|
* @override
|
2019-07-28 10:31:56 +08:00
|
|
|
|
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˳<EFBFBD>ǰ<EFBFBD><EFBFBD><EFBFBD>õĻص<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2014-11-19 00:25:21 +08:00
|
|
|
|
*/
|
2019-07-20 16:14:09 +08:00
|
|
|
|
void proc_on_exit(void);
|
2017-07-05 10:27:33 +08:00
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @override
|
2019-07-28 10:31:56 +08:00
|
|
|
|
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>յ<EFBFBD> SIGHUP <EFBFBD>źź<EFBFBD><EFBFBD>Ļص<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2017-07-05 10:27:33 +08:00
|
|
|
|
*/
|
2017-09-09 00:30:39 +08:00
|
|
|
|
bool proc_on_sighup(acl::string&);
|
2020-06-29 14:34:16 +08:00
|
|
|
|
|
|
|
|
|
private:
|
2020-06-29 17:17:56 +08:00
|
|
|
|
http_service* service_;
|
2014-11-19 00:25:21 +08:00
|
|
|
|
};
|