dataRT/route/ws/ws.go

20 lines
256 B
Go

package ws
import (
"sync"
"github.com/gorilla/websocket"
)
type Ws struct{}
var upgrader = websocket.Upgrader{
ReadBufferSize: 1024,
WriteBufferSize: 1024,
WriteBufferPool: &sync.Pool{
New: func() any {
return make([]byte, 1024)
},
},
}