• Api Documentation
  • Source Code
Search Results for

    Show / Hide Table of Contents
    • SharpOpenNat
      • Extensions
      • INatDevice
      • INatDiscoverer
      • Mapping
      • MappingException
      • MappingLifetime
      • NatDeviceNotFoundException
      • OpenNat
      • PortMapper
      • Protocol

    Class Extensions

    Extension Methods for the exposed interfaces

    Inheritance
    object
    Extensions
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: SharpOpenNat
    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
    Type Name Description
    INatDevice device
    int startingPort
    CancellationToken cancellationToken
    Returns
    Type Description
    Task<int>
    | 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
    Type Name Description
    INatDiscoverer discoverer
    int startingPort
    CancellationToken cancellationToken
    Returns
    Type Description
    Task<int>
    | 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
    Type Name Description
    INatDevice device
    CancellationToken cancellationToken
    Returns
    Type Description
    Task<List<int>>
    | 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
    Type Name Description
    INatDiscoverer discoverer
    CancellationToken cancellationToken
    Returns
    Type Description
    Task<List<int>>
    • Edit this page
    • View Source
    In this article
    Back to top Copyright Alan McGovern, Ben Motmans, Lucas Ontivero, Jérémy Ansel (c) 2006-2024