NatBehaviorTracker class

A class that tracks NAT behavior over time

Constructors

NatBehaviorTracker({required StunClientPool stunClientPool, StorageBroker? storageBroker, NetworkInterfaceMonitor? networkInterfaceMonitor, String storageKey = 'nat_behavior', Duration checkInterval = const Duration(minutes: 30), int maxHistorySize = 100})
Creates a new NAT behavior tracker

Properties

behaviorHistory → List<NatBehaviorRecord>
The history of NAT behavior records
no setter
callbacks → List<NatBehaviorChangeCallback>
no setter
checkInterval → Duration
The interval between periodic checks
final
currentBehavior → NatBehavior
The current NAT behavior
no setter
hashCode → int
The hash code for this object.
no setterinherited
maxHistorySize → int
The maximum number of behavior records to keep in history
final
networkInterfaceMonitor → NetworkInterfaceMonitor?
The network interface monitor to use for detecting network changes
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
storageBroker → StorageBroker?
The storage broker to use for persistent storage
final
storageKey → String
The key to use for storage
final
stunClientPool → StunClientPool
The STUN client pool to use for NAT behavior discovery
final

Methods

addBehaviorChangeCallback(NatBehaviorChangeCallback callback) → void
Adds a callback for NAT behavior changes
discoverBehavior() → Future<NatBehavior>
Discovers the current NAT behavior
dispose() → void
Disposes the NAT behavior tracker
initialize() → Future<void>
Initializes the NAT behavior tracker
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
removeBehaviorChangeCallback(NatBehaviorChangeCallback callback) → void
Removes a callback for NAT behavior changes
stopPeriodicChecks() → void
Stops periodic checks for NAT behavior changes
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited