This commit is contained in:
wjqserver 2025-04-15 15:05:36 +08:00
parent f110c96c1f
commit 254c9a8bad
2 changed files with 4 additions and 4 deletions

View file

@ -26,7 +26,7 @@ import (
"github.com/cloudwego/hertz/pkg/common/adaptor"
"github.com/cloudwego/hertz/pkg/common/hlog"
//"github.com/cloudwego/hertz/pkg/network/standard"
"github.com/cloudwego/hertz/pkg/network/standard"
"github.com/hertz-contrib/http2/factory"
)
@ -378,8 +378,8 @@ func main() {
r = server.New(
server.WithHostPorts(addr),
server.WithH2C(true),
// server.WithALPN(true),
// server.WithTransport(standard.NewTransporter),
// server.WithALPN(true),
server.WithTransport(standard.NewTransporter),
)
r.AddProtocol("h2", factory.NewServerFactory())
} else {