Versions in this module Expand all Collapse all v0 v0.2.0 Mar 11, 2022 Changes in this version + type ReconnectOptions struct + Delay time.Duration + Enabled bool type Socket + ReconnectOptions *ReconnectOptions + func (socket *Socket) ConnectAndWait() error + func (socket *Socket) SetReconnect(delay time.Duration) v0.1.0 Mar 11, 2022 Changes in this version + func BuildProxy(Url string) func(*http.Request) (*url.URL, error) + type ConnectionOptions struct + Proxy func(*http.Request) (*url.URL, error) + Subprotocols []string + UseCompression bool + UseSSL bool + type Socket struct + Conn *websocket.Conn + ConnectionOptions ConnectionOptions + IsConnected bool + OnBinaryMessage func(data []byte) + OnConnectError func(err error) + OnConnected func() + OnDisconnected func(err error) + OnPingReceived func(data string) + OnPongReceived func(data string) + OnTextMessage func(message string) + RequestHeader http.Header + Timeout time.Duration + Url string + WebsocketDialer *websocket.Dialer + func New(url string, ssl bool) *Socket + func (socket *Socket) Close() error + func (socket *Socket) Connect() error + func (socket *Socket) SendBinary(data []byte) error + func (socket *Socket) SendJSON(data interface{}) error + func (socket *Socket) SendText(message string) error