Versions in this module Expand all Collapse all v0 v0.2.0 Oct 13, 2026 Changes in this version + var ErrAlreadyConnected = errors.New("socket connection is already connecting or connected") + var ErrNotConnected = errors.New("socket connection is not initialized") + type Option func(*WebSocketConnection) error + func WithCompression(mode websocket.CompressionMode) Option + func WithHTTPClient(client *http.Client) Option + func WithReadLimit(limit int64) Option + type WebSocketConnection struct + func New(options ...Option) (*WebSocketConnection, error) + func (ws *WebSocketConnection) Close() error + func (ws *WebSocketConnection) Dial(ctx context.Context, endpoint *url.URL, origin *url.URL) error + func (ws *WebSocketConnection) Receive(v *[]byte) error + func (ws *WebSocketConnection) ReceiveFrame(v *[]byte) (bool, error) + func (ws *WebSocketConnection) Send(v []byte) error + func (ws *WebSocketConnection) SendBinary(v []byte) error