加入summary 优化http监听逻辑,实现基本身份认证

This commit is contained in:
dexter
2022-03-01 20:42:25 +08:00
parent 37586d4a0b
commit abe2cdd1fc
11 changed files with 326 additions and 64 deletions

View File

@@ -1,5 +1,7 @@
package config
import "net/http"
type PublishConfig interface {
GetPublishConfig() *Publish
}
@@ -77,10 +79,12 @@ type Engine struct {
EnableRTP bool //启用RTP格式rtsp、gb18181等协议使用
EnableFLV bool //开启FLV格式hdl协议使用
}
func (cfg *Engine) OnEvent(event any) {
}
var Global = &Engine{
Publish{true, true, false, 10, 0},
Subscribe{true, true, false, 10},
HTTP{ListenAddr: ":8080", CORS: true},
HTTP{ListenAddr: ":8080", CORS: true, mux: http.DefaultServeMux},
false, true, true, true,
}