Protocols
The following protocols are available globally.
-
The TxClientDelegate protocol defines methods for receiving events and updates from a TxClient instance. Implement this protocol to handle various states and events in your WebRTC-enabled application, including connection status, call state changes, and push notifications.
Usage Example:
See moreclass CallHandler: TxClientDelegate { func onSocketConnected() { print("Connected to Telnyx backend") } func onIncomingCall(call: Call) { // Handle incoming call call.answer() } // Implement other required methods... }
Declaration
Swift
public protocol TxClientDelegate : AnyObject
-
Protocol defining the interface for custom logging in the Telnyx SDK. Implement this protocol to create a custom logger that can receive and handle logs from the SDK.
See moreDeclaration
Swift
public protocol TxLogger