Versions in this module Expand all Collapse all v0 v0.1.3 Jul 8, 2026 Changes in this version + const BufSize + var ErrClosed = errors.New("websocket connection closed") + func AsWebSocket(handler func(*Conn) error) httpx.RespOption + func AsWebSocketWithPing(handler func(*Conn) error) httpx.RespOption + type Conn struct + func NewConn(ctx *gin.Context) (*Conn, error) + func (c *Conn) Close() error + func (c *Conn) IsClosed() bool + func (c *Conn) Messages() <-chan *Message + func (c *Conn) Send(msg *Message) error + func (c *Conn) SendError(errMsg string) error + func (c *Conn) SendEvent(eventType string, data interface{}) error + func (c *Conn) SendJSON(data interface{}) error + type Message struct + Data interface{} + ID string + Time int64 + Type string