Expired Event
Fires when an allocation, permission, or channel has expired.
Syntax
public open class DefaultTurnEventListener : TurnEventListener { ... public override fun expired(e: TurnExpiredEvent) {} ... } public class TurnExpiredEvent { val kind: Int val channelId: String? val peerIP: String? val peerPort: Int }
Remarks
This event fires anytime an allocation, permission, or channel expires.
The Kind parameter reflects which entity expired; it will be one of the following:
- 0: Allocation
- 1: Permission
- 2: Channel
The ChannelId parameter reflects the Id of the expired channel when Kind is 2; it is -1 otherwise.
The PeerIP parameter reflects the peer IP address associated with the expired permission or channel when Kind is 1 or 2; it is empty otherwise.
The PeerPort parameter reflects the peer port associated with the expired channel when Kind is 2; it is -1 otherwise.