mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-22 19:00:01 +08:00
精简配置文件
This commit is contained in:
parent
314c4cfa7a
commit
029fdaeae6
@ -75,12 +75,6 @@ onceToken token([](){
|
||||
namespace Http {
|
||||
#define HTTP_FIELD "http."
|
||||
|
||||
#define HTTP_PORT 80
|
||||
const char kPort[] = HTTP_FIELD"port";
|
||||
|
||||
#define HTTPS_PORT 443
|
||||
extern const char kSSLPort[] = HTTP_FIELD"sslport";
|
||||
|
||||
//http 文件发送缓存大小
|
||||
#define HTTP_SEND_BUF_SIZE (64 * 1024)
|
||||
const char kSendBufSize[] = HTTP_FIELD"sendBufSize";
|
||||
@ -123,8 +117,6 @@ const char kNotFound[] = HTTP_FIELD"notFound";
|
||||
|
||||
|
||||
onceToken token([](){
|
||||
mINI::Instance()[kPort] = HTTP_PORT;
|
||||
mINI::Instance()[kSSLPort] = HTTPS_PORT;
|
||||
mINI::Instance()[kSendBufSize] = HTTP_SEND_BUF_SIZE;
|
||||
mINI::Instance()[kMaxReqSize] = HTTP_MAX_REQ_SIZE;
|
||||
mINI::Instance()[kKeepAliveSecond] = HTTP_KEEP_ALIVE_SECOND;
|
||||
@ -140,14 +132,10 @@ onceToken token([](){
|
||||
namespace Shell {
|
||||
#define SHELL_FIELD "shell."
|
||||
|
||||
#define SHELL_PORT 9000
|
||||
const char kPort[] = SHELL_FIELD"port";
|
||||
|
||||
#define SHELL_MAX_REQ_SIZE 1024
|
||||
const char kMaxReqSize[] = SHELL_FIELD"maxReqSize";
|
||||
|
||||
onceToken token([](){
|
||||
mINI::Instance()[kPort] = SHELL_PORT;
|
||||
mINI::Instance()[kMaxReqSize] = SHELL_MAX_REQ_SIZE;
|
||||
},nullptr);
|
||||
} //namespace Shell
|
||||
@ -155,14 +143,9 @@ onceToken token([](){
|
||||
////////////RTSP服务器配置///////////
|
||||
namespace Rtsp {
|
||||
#define RTSP_FIELD "rtsp."
|
||||
|
||||
#define RTSP_PORT 554
|
||||
const char kPort[] = RTSP_FIELD"port";
|
||||
|
||||
const char kAuthBasic[] = RTSP_FIELD"authBasic";
|
||||
|
||||
onceToken token([](){
|
||||
mINI::Instance()[kPort] = RTSP_PORT;
|
||||
//默认Md5方式认证
|
||||
mINI::Instance()[kAuthBasic] = 0;
|
||||
},nullptr);
|
||||
@ -172,13 +155,9 @@ onceToken token([](){
|
||||
////////////RTMP服务器配置///////////
|
||||
namespace Rtmp {
|
||||
#define RTMP_FIELD "rtmp."
|
||||
|
||||
#define RTMP_PORT 1935
|
||||
const char kPort[] = RTMP_FIELD"port";
|
||||
const char kModifyStamp[] = RTMP_FIELD"modifyStamp";
|
||||
|
||||
onceToken token([](){
|
||||
mINI::Instance()[kPort] = RTMP_PORT;
|
||||
mINI::Instance()[kModifyStamp] = true;
|
||||
},nullptr);
|
||||
} //namespace RTMP
|
||||
|
@ -151,8 +151,6 @@ extern const char kBroadcastReloadConfig[];
|
||||
|
||||
////////////HTTP配置///////////
|
||||
namespace Http {
|
||||
extern const char kPort[];
|
||||
extern const char kSSLPort[];
|
||||
//http 文件发送缓存大小
|
||||
extern const char kSendBufSize[];
|
||||
//http 最大请求字节数
|
||||
@ -173,20 +171,16 @@ extern const char kNotFound[];
|
||||
////////////SHELL配置///////////
|
||||
namespace Shell {
|
||||
extern const char kMaxReqSize[];
|
||||
extern const char kPort[];
|
||||
} //namespace Shell
|
||||
|
||||
////////////RTSP服务器配置///////////
|
||||
namespace Rtsp {
|
||||
|
||||
extern const char kPort[];
|
||||
//是否优先base64方式认证?默认Md5方式认证
|
||||
extern const char kAuthBasic[];
|
||||
} //namespace Rtsp
|
||||
|
||||
////////////RTMP服务器配置///////////
|
||||
namespace Rtmp {
|
||||
extern const char kPort[];
|
||||
extern const char kModifyStamp[];
|
||||
|
||||
} //namespace RTMP
|
||||
|
@ -42,6 +42,22 @@ using namespace std;
|
||||
using namespace toolkit;
|
||||
using namespace mediakit;
|
||||
|
||||
namespace mediakit {
|
||||
////////////HTTP配置///////////
|
||||
namespace Http {
|
||||
#define HTTP_FIELD "http."
|
||||
#define HTTP_PORT 80
|
||||
const char kPort[] = HTTP_FIELD"port";
|
||||
#define HTTPS_PORT 443
|
||||
extern const char kSSLPort[] = HTTP_FIELD"sslport";
|
||||
onceToken token1([](){
|
||||
mINI::Instance()[kPort] = HTTP_PORT;
|
||||
mINI::Instance()[kSSLPort] = HTTPS_PORT;
|
||||
},nullptr);
|
||||
}//namespace Http
|
||||
} // namespace mediakit
|
||||
|
||||
|
||||
static onceToken s_token([](){
|
||||
NoticeCenter::Instance().addListener(nullptr,Broadcast::kBroadcastHttpRequest,[](BroadcastHttpRequestArgs){
|
||||
//const Parser &parser,HttpSession::HttpResponseInvoker &invoker,bool &consumed
|
||||
|
Loading…
Reference in New Issue
Block a user