centrifugal / centrifuge-android

Android client to communicate with Centrifugo v1 over Websockets (not maintained anymore)
48 stars 26 forks source link

Support websocket connection close reason #8

Open FZambia opened 7 years ago

FZambia commented 7 years ago

Centrifugo sends Disconnect Advice in connection close reason (in Close Websocket frame). It's a JSON encoded string which contains 2 fields at moment, for example

{
  "reason": "shutting down",
  "reconnect": true
}

Client should follow this reconnect advice - if it's false then client should not attempt to reconnect.