Expired Event
Fires when an allocation, permission, or channel has expired.
Syntax
public class DefaultTurnEventListener implements TurnEventListener { ... public void expired(TurnExpiredEvent e) {} ... } public class TurnExpiredEvent { public int kind; public String channelId; public String peerIP; public int peerPort; }
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.