update for touka-httpc 0.4.0

This commit is contained in:
wjqserver 2025-04-11 07:24:50 +08:00
parent d6d54b222f
commit 8af107c584
4 changed files with 42 additions and 15 deletions

View file

@ -26,6 +26,8 @@ import (
"github.com/cloudwego/hertz/pkg/common/adaptor"
"github.com/cloudwego/hertz/pkg/common/hlog"
//"github.com/cloudwego/hertz/pkg/network/standard"
"github.com/hertz-contrib/http2/factory"
)
@ -146,6 +148,7 @@ func setupHertZLogger(cfg *config.Config) {
} else {
hlog.SetOutput(hertZfile)
}
hlog.SetLevel(hlog.LevelInfo)
}
}
@ -377,6 +380,8 @@ func main() {
r = server.New(
server.WithHostPorts(addr),
server.WithH2C(true),
// server.WithALPN(true),
// server.WithTransport(standard.NewTransporter),
)
r.AddProtocol("h2", factory.NewServerFactory())
} else {