TxClientDelegate
Usage Example:
Methods
onSocketConnected()
onClientReady before initiating calls.
onSocketDisconnected()
onClientError(error:)
- Parameter error: The error that occurred. Check the error type and message for details. Common errors include authentication failures and network connectivity issues.
Parameters
| Name | Description |
|---|---|
| error | The error that occurred. Check the error type and message for details. Common errors include authentication failures and network connectivity issues. |
onClientReady()
onPushDisabled(success:message:)
- Parameters:
- success: Whether the push notification operation succeeded
- message: Descriptive message about the operation result
Parameters
| Name | Description |
|---|---|
| success | Whether the push notification operation succeeded |
| message | Descriptive message about the operation result |
onSessionUpdated(sessionId:)
- Parameter sessionId: The new session identifier for the connection. Store this ID if you need to track or debug connection issues.
Parameters
| Name | Description |
|---|---|
| sessionId | The new session identifier for the connection. Store this ID if you need to track or debug connection issues. |
onCallStateUpdated(callState:callId:)
- Parameters:
- callState: The new state of the call (NEW, CONNECTING, RINGING, ACTIVE, HELD, DONE)
- callId: The unique identifier of the affected call Use this to update your UI to reflect the current call state.
Parameters
| Name | Description |
|---|---|
| callState | The new state of the call (NEW, CONNECTING, RINGING, ACTIVE, HELD, DONE) |
| callId | The unique identifier of the affected call Use this to update your UI to reflect the current call state. |
onIncomingCall(call:)
- Parameter call: The Call object representing the incoming call. You can use this object to answer or reject the call.
Parameters
| Name | Description |
|---|---|
| call | The Call object representing the incoming call. You can use this object to answer or reject the call. |
onRemoteCallEnded(callId:reason:)
- Parameters:
- callId: The unique identifier of the ended call.
- reason: Optional termination reason containing details about why the call ended. Use this to clean up any call-related UI elements or state and potentially display error messages.
Parameters
| Name | Description |
|---|---|
| callId | The unique identifier of the ended call. |
| reason | Optional termination reason containing details about why the call ended. Use this to clean up any call-related UI elements or state and potentially display error messages. |
onPushCall(call:)
- Parameter call: The Call object created from the push notification data. This is specifically for handling calls that arrive via push notifications when the app is in the background.
Parameters
| Name | Description |
|---|---|
| call | The Call object created from the push notification data. This is specifically for handling calls that arrive via push notifications when the app is in the background. |