Expired Event

Fires when an allocation, permission, or channel has expired.

Syntax

public event OnExpiredHandler OnExpired;

public delegate void OnExpiredHandler(object sender, TurnExpiredEventArgs e);

public class TurnExpiredEventArgs : EventArgs {
  public int Kind { get; }
  public string ChannelId { get; }
  public string PeerIP { get; }
  public int PeerPort { get; }
}
Public Event OnExpired As OnExpiredHandler

Public Delegate Sub OnExpiredHandler(sender As Object, e As TurnExpiredEventArgs)

Public Class TurnExpiredEventArgs Inherits EventArgs
  Public ReadOnly Property Kind As Integer
  Public ReadOnly Property ChannelId As String
  Public ReadOnly Property PeerIP As String
  Public ReadOnly Property PeerPort As Integer
End Class

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.

Copyright (c) 2022 /n software inc. - All rights reserved.
IPWorks P2P 2020 .NET Edition - Version 20.0 [Build 8235]