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,
WriteBufferSize: 4096,
WriteBufferPool: &sync.Pool{
New: func() any {
return make([]byte, 4096)
},
},
}