You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
443 B
19 lines
443 B
2 months ago
|
//go:build !windows
|
||
|
// +build !windows
|
||
|
|
||
|
package dtnetwork
|
||
|
|
||
|
import (
|
||
|
"github.com/cloudwego/hertz/pkg/common/config"
|
||
|
"github.com/cloudwego/hertz/pkg/network"
|
||
|
"github.com/cloudwego/hertz/pkg/network/netpoll"
|
||
|
"github.com/cloudwego/hertz/pkg/network/standard"
|
||
|
)
|
||
|
|
||
|
func GetTransporter(enableNetpoll bool) func(options *config.Options) network.Transporter {
|
||
|
if enableNetpoll {
|
||
|
return netpoll.NewTransporter
|
||
|
}
|
||
|
return standard.NewTransporter
|
||
|
}
|