@protocol StringeeConnectionDelegate <NSObject>
Used to monitors the client's connection.
| - didConnect:isReconnecting: |
|---|
|
Invoked when the client connects to Stringee server:
|
| - didDisConnect:isReconnecting: |
|
Invoked when the client disconnects from Stringee server:
|
| - didFailWithError:code:message: |
|
Invoked when the client fails to connect to Stringee server: From SDK 2.2.0, when the access token expires without being renewed, the server disconnects the client: this method is invoked with code = 6, then requestAccessToken: is invoked. The client does not reconnect with the expired token.
|
| - requestAccessToken: |
|
Invoked when the access token is expired. You must get a new token and reconnect: From SDK 2.2.0, this method is also invoked in these cases:
|
| - tokenWillExpire:exp:expireInSeconds: |
|
Optional. Invoked about 60 seconds before the access token expires, on servers that support token expiration. Get a new token for the same user from your server and call updateToken:completionHandler: to renew it on the open connection without reconnecting. If you do not implement this method, requestAccessToken: is invoked instead. If the token is not renewed, the server disconnects the client when the token expires. During a StringeeCall voice call, the server waits until the call ends before disconnecting; it does not wait for a StringeeCall2 call, so renew the token as soon as this method is invoked. Available from SDK 2.2.0:
|
| - didReceiveCustomMessage:message:fromUserId |
|
Invoked when the client receives a custom message from another client:
|