why deepstreamHub? compare us getting started feature roadmap faq
use cases pricing
products
developers
company
blog contact

A listener that will be notified whenever the ConnectionState changes. Can be added via DeepstreamClient.addConnectionChangeListener(_:) and removed via DeepstreamClient.removeConnectionChangeListener(_:).

Learn more about connections states and connectivity issues

Methods

connectionStateChanged(_:)

func connectionStateChanged(_ connectionState: ConnectionState) -> Void
argument type description
state ConnectionState The current connection state

Called with the new updated connection state. Useful for enabling applications to respond to different scenarios, like ConnectionState.ERROR if an error occurs, or ConnectionState.RECONNECTING if the connection drops.