Documentation ¶
Index ¶
- Constants
- Variables
- type ReconnectingWebsocket
- func (ws *ReconnectingWebsocket) Close(willReconnect bool)
- func (ws *ReconnectingWebsocket) CloseAndReconnect()
- func (ws *ReconnectingWebsocket) Connect(isReconnect bool)
- func (ws *ReconnectingWebsocket) Dial(urlStr string, reqHeader http.Header, opts ...WsOpts) error
- func (ws *ReconnectingWebsocket) GetDialError() error
- func (ws *ReconnectingWebsocket) GetHTTPResponse() *http.Response
- func (ws *ReconnectingWebsocket) IsClosed() bool
- func (ws *ReconnectingWebsocket) IsClosedNoReconnect() bool
- func (ws *ReconnectingWebsocket) IsClosing() bool
- func (ws *ReconnectingWebsocket) IsConnected() bool
- func (ws *ReconnectingWebsocket) ReadMessage() (messageType int, message []byte, err error)
- func (ws *ReconnectingWebsocket) WriteHeartbeat() error
- func (ws *ReconnectingWebsocket) WriteJSON(v interface{}) error
- func (ws *ReconnectingWebsocket) WriteMessage(messageType int, data []byte) error
- type WsOpts
Constants ¶
View Source
const PING_TIMEOUT = time.Duration(9000) * time.Millisecond
Variables ¶
Functions ¶
This section is empty.
Types ¶
type ReconnectingWebsocket ¶
type ReconnectingWebsocket struct { ReconnectIntervalMin time.Duration ReconnectIntervalMax time.Duration ReconnectIntervalFactor float64 HandshakeTimeout time.Duration OnWillReconnect func() OnReconnect func() OnInvalid func() OnThrottled func() Verbose bool *websocket.Conn // contains filtered or unexported fields }
func (*ReconnectingWebsocket) Close ¶
func (ws *ReconnectingWebsocket) Close(willReconnect bool)
func (*ReconnectingWebsocket) CloseAndReconnect ¶
func (ws *ReconnectingWebsocket) CloseAndReconnect()
func (*ReconnectingWebsocket) Connect ¶
func (ws *ReconnectingWebsocket) Connect(isReconnect bool)
func (*ReconnectingWebsocket) GetDialError ¶
func (ws *ReconnectingWebsocket) GetDialError() error
func (*ReconnectingWebsocket) GetHTTPResponse ¶
func (ws *ReconnectingWebsocket) GetHTTPResponse() *http.Response
func (*ReconnectingWebsocket) IsClosed ¶
func (ws *ReconnectingWebsocket) IsClosed() bool
func (*ReconnectingWebsocket) IsClosedNoReconnect ¶
func (ws *ReconnectingWebsocket) IsClosedNoReconnect() bool
func (*ReconnectingWebsocket) IsClosing ¶
func (ws *ReconnectingWebsocket) IsClosing() bool
func (*ReconnectingWebsocket) IsConnected ¶
func (ws *ReconnectingWebsocket) IsConnected() bool
func (*ReconnectingWebsocket) ReadMessage ¶
func (ws *ReconnectingWebsocket) ReadMessage() (messageType int, message []byte, err error)
func (*ReconnectingWebsocket) WriteHeartbeat ¶
func (ws *ReconnectingWebsocket) WriteHeartbeat() error
func (*ReconnectingWebsocket) WriteJSON ¶
func (ws *ReconnectingWebsocket) WriteJSON(v interface{}) error
func (*ReconnectingWebsocket) WriteMessage ¶
func (ws *ReconnectingWebsocket) WriteMessage(messageType int, data []byte) error
Click to show internal directories.
Click to hide internal directories.