dataRT/route/ws/ws.go

20 lines
256 B
Go
Raw Normal View History

2026-03-06 17:17:39 +08:00
package ws
import (
"sync"
"github.com/gorilla/websocket"
)
type Ws struct{}
var upgrader = websocket.Upgrader{
ReadBufferSize: 1024,
2026-03-20 17:37:39 +08:00
WriteBufferSize: 1024,
2026-03-06 17:17:39 +08:00
WriteBufferPool: &sync.Pool{
New: func() any {
2026-03-20 17:37:39 +08:00
return make([]byte, 1024)
2026-03-06 17:17:39 +08:00
},
},
}