增加websocket库

This commit is contained in:
ayflying
2025-03-24 17:39:09 +08:00
parent cc08e830d3
commit 8d640be472
3 changed files with 51 additions and 8 deletions

View File

@@ -1,7 +1,9 @@
package websocket
import "context"
// 定义一个处理方法的类型
type Handler func(uid int64, data []byte)
type Handler func(ctx context.Context, req any) (err error)
// 路由器的处理映射
var (