Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ReconWs ¶
type ReconWs struct { ForwardIncoming bool In chan WsMessage Out chan WsMessage Retry RetryConfig Stats *chanstats.ChanStats URL string ID string }
ReconWs represents a websocket client that will reconnect if the connection is closed connects (retrying/reconnecting if necessary) to websocket server at url
func (*ReconWs) Dial ¶
Dial the websocket server once. If dial fails then return immediately If dial succeeds then handle message traffic until the context is cancelled
func (*ReconWs) Reconnect ¶
Reconnect sets URL to connect to, and runs the client run this in a separate goroutine so that the connection can be ended from where it was initialised, by close((* ReconWs).Stop)
func (*ReconWs) ReconnectAuth ¶
ReconnectAuth reconnects to a relay instance that uses an access server to gatekeep access to the websocket relay run this in a separate goroutine so that the connection can be ended from where it was initialised, by close((* ReconWs).Stop)