Versions in this module Expand all Collapse all v0 v0.1.0 Feb 29, 2024 Changes in this version + var ErrorInvalidClient = errors.New("invalid client") + type Client interface + MustWrite func(bytes []byte) + Write func(bytes []byte) error + type Config struct + ReadBufferSize int + ReadLimit int64 + WriteBufferSize int + WriteLimit int64 + type Ws interface + Broadcast func(bytes []byte) + Find func(id ...int) ([]Client, error) + FindOne func(id int) (Client, error) + MustFind func(id ...int) []Client + MustFindOne func(id int) Client + MustServe func(req *http.Request, res http.ResponseWriter, id int) + OnRead func(fn func(bytes []byte)) Ws + Serve func(req *http.Request, res http.ResponseWriter, id int) error + func New(config ...Config) Ws