go_reuseport:将SO_REUSEPORT带入您的Go服务器

时间:2021-02-04 14:15:00
【文件属性】:
文件名称:go_reuseport:将SO_REUSEPORT带入您的Go服务器
文件大小:15KB
文件格式:ZIP
更新时间:2021-02-04 14:15:00
go GoGo GO_REUSEPORT GO_REUSEPORT有点expirement创建net.Listener支持套接字选项。 目前,支持Darwin和Linux(3.9版以上)系统。 如果您要测试其他系统并将结果告诉我,我将很高兴。 上的 。 例 package main import ( "fmt" "html" "net/http" "os" "runtime" "github.com/kavu/go_reuseport" ) func main () { listener , err := reuseport . Listen ( "tcp" , "localh
【文件预览】:
go_reuseport-master
----.travis.yml(302B)
----reuseport.go(2KB)
----tcp_test.go(6KB)
----test.bash(700B)
----LICENSE(1KB)
----reuseport_windows.go(1KB)
----reuseport_linux.go(2KB)
----.gitignore(262B)
----.circleci()
--------config.yml(400B)
----Makefile(174B)
----udp.go(4KB)
----reuseport_bsd.go(2KB)
----README.md(2KB)
----udp_test.go(3KB)
----tcp.go(4KB)
----go.mod(36B)

网友评论