Ai
1 Star 0 Fork 0

庞飞/multiapp

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
base_handler.go 730 Bytes
一键复制 编辑 原始数据 按行查看 历史
庞飞 提交于 2023-10-03 10:28 +08:00 . 合并主框架
package websocket
import (
"net/http"
"gitee.com/pangxianfei/multiapp/kernel/zone"
)
type BaseHandler struct {
}
func (bh *BaseHandler) OnPing(hub Hub, appData string) {
}
func (bh *BaseHandler) OnPong(hub Hub, appData string) {
}
func (bh *BaseHandler) OnClose(hub Hub, code int, text string) {
}
func (bh *BaseHandler) ReadBufferSize() int {
return 1024
}
func (bh *BaseHandler) WriteBufferSize() int {
return 1024
}
func (bh *BaseHandler) CheckOrigin(r *http.Request) bool {
return true
}
func (bh *BaseHandler) WriteTimeout() zone.Duration {
return 10 * zone.Second
}
func (bh *BaseHandler) ReadTimeout() zone.Duration {
return 60 * zone.Second
}
func (bh *BaseHandler) MaxMessageSize() int64 {
return 512
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/pangxianfei/multiapp.git
git@gitee.com:pangxianfei/multiapp.git
pangxianfei
multiapp
multiapp
v1.2.3

搜索帮助