A client can automatically detect if there are problems with its
connection to the Diffusion™ server and take action to handle any
When a client detects that it has become disconnected from the Diffusion server
, the session state changes from CONNECTED to one
of the following states:
- If reconnection is enabled at the client and at the Diffusion server, the session state changes to RECOVERING.
- If reconnection is not enabled, the session state changes to
The client can detect that it has become disconnected from the Diffusion server using the following methods:
Monitoring the connection activity
The client automatically monitors the activity between the client and the Diffusion server and uses this information to quickly discover any
Using TCP state
Depending on the transport the client uses to connect to the Diffusion server
, the client can use the TCP state to detect
whether to change its state from CONNECTED to one of RECOVERING or DISCONNECTED.
- WebSocket: The client uses the TCP state to detect whether to trigger a
- HTTP Polling: The client uses the TCP state at certain points during an HTTP
request to detect whether to trigger a state change.