Class Extensions
Extension Methods for the exposed interfaces
Assembly: SharpOpenNat.dll
Syntax
public static class Extensions
Methods
|
Edit this page
View Source
GetAvailablePortAsync(INatDevice, int, CancellationToken)
Get the first available port on the specified device
starting from startingPort
Declaration
public static Task<int> GetAvailablePortAsync(this INatDevice device, int startingPort, CancellationToken cancellationToken = default)
Parameters
Returns
|
Edit this page
View Source
GetAvailablePortAsync(INatDiscoverer, int, CancellationToken)
Get the first available port starting from startingPort
on the first found device
Declaration
public static Task<int> GetAvailablePortAsync(this INatDiscoverer discoverer, int startingPort, CancellationToken cancellationToken = default)
Parameters
Returns
|
Edit this page
View Source
GetUsedPortsAsync(INatDevice, CancellationToken)
Get all used ports on the specified device
Declaration
public static Task<List<int>> GetUsedPortsAsync(this INatDevice device, CancellationToken cancellationToken = default)
Parameters
Returns
|
Edit this page
View Source
GetUsedPortsAsync(INatDiscoverer, CancellationToken)
Get all used ports on the first found device
Declaration
public static Task<List<int>> GetUsedPortsAsync(this INatDiscoverer discoverer, CancellationToken cancellationToken = default)
Parameters
Returns