Ai
1 Star 1 Fork 0

carlzyhuang/framework

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
opts.go 425 Bytes
一键复制 编辑 原始数据 按行查看 历史
huangzhiyong 提交于 2025-10-22 17:41 +08:00 . websocket 长连接的消息调度实现
package websocket
import "time"
type ServerOption func(*Server)
// Network with server network.
func Network(network string) ServerOption {
return func(s *Server) {
s.network = network
}
}
// Address with server address.
func Address(addr string) ServerOption {
return func(s *Server) {
s.address = addr
}
}
func Timeout(timeout time.Duration) ServerOption {
return func(s *Server) {
s.timeout = timeout
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/carlzyhuang/framework.git
git@gitee.com:carlzyhuang/framework.git
carlzyhuang
framework
framework
v0.0.18

搜索帮助