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:

    class CallHandler: TxClientDelegate {
        func onSocketConnected() {
            print("Connected to Telnyx backend")
        }
    
        func onIncomingCall(call: Call) {
            // Handle incoming call
            call.answer()
        }
    
        // Implement other required methods...
    }
    
    See more

    Declaration

    Swift

    public protocol TxClientDelegate : AnyObject