mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-26 04:31:37 +08:00
fixed #51
This commit is contained in:
parent
ee8edb8ba8
commit
1c89c60963
@ -56,7 +56,7 @@ onceToken token1([](){
|
|||||||
}//namespace Http
|
}//namespace Http
|
||||||
} // namespace mediakit
|
} // namespace mediakit
|
||||||
|
|
||||||
|
void initEventListener(){
|
||||||
static onceToken s_token([](){
|
static onceToken s_token([](){
|
||||||
NoticeCenter::Instance().addListener(nullptr,Broadcast::kBroadcastHttpRequest,[](BroadcastHttpRequestArgs){
|
NoticeCenter::Instance().addListener(nullptr,Broadcast::kBroadcastHttpRequest,[](BroadcastHttpRequestArgs){
|
||||||
//const Parser &parser,HttpSession::HttpResponseInvoker &invoker,bool &consumed
|
//const Parser &parser,HttpSession::HttpResponseInvoker &invoker,bool &consumed
|
||||||
@ -99,6 +99,7 @@ static onceToken s_token([](){
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
}, nullptr);
|
}, nullptr);
|
||||||
|
}
|
||||||
|
|
||||||
int main(int argc,char *argv[]){
|
int main(int argc,char *argv[]){
|
||||||
//设置退出信号处理函数
|
//设置退出信号处理函数
|
||||||
@ -111,6 +112,7 @@ int main(int argc,char *argv[]){
|
|||||||
|
|
||||||
//加载配置文件,如果配置文件不存在就创建一个
|
//加载配置文件,如果配置文件不存在就创建一个
|
||||||
loadIniConfig();
|
loadIniConfig();
|
||||||
|
initEventListener();
|
||||||
|
|
||||||
//加载证书,证书包含公钥和私钥
|
//加载证书,证书包含公钥和私钥
|
||||||
SSL_Initor::Instance().loadCertificate((exeDir() + "ssl.p12").data());
|
SSL_Initor::Instance().loadCertificate((exeDir() + "ssl.p12").data());
|
||||||
|
Loading…
Reference in New Issue
Block a user