C# Class Open.Nat.NatDevice

Represents a NAT device and provides access to the operation set that allows open (forward) ports, close ports and get the externa (visible) IP address.
Afficher le fichier Open project: mcatanzariti/Open.NAT Class Usage Examples

Méthodes publiques

Méthode Description
CreatePortMapAsync ( Open.Nat.Mapping mapping ) : System.Threading.Tasks.Task

Creates the port map asynchronous.

DeletePortMapAsync ( Open.Nat.Mapping mapping ) : System.Threading.Tasks.Task

Deletes a mapped port asynchronous.

GetAllMappingsAsync ( ) : Task>

Gets all mappings asynchronous.

GetExternalIPAsync ( ) : Task

Gets the external (visible) IP address asynchronous. This is the NAT device IP address

GetSpecificMappingAsync ( Protocol protocol, int port ) : Task

Gets the specified mapping asynchronous.

Méthodes protégées

Méthode Description
RegisterMapping ( Open.Nat.Mapping mapping ) : void
UnregisterMapping ( Open.Nat.Mapping mapping ) : void

Private Methods

Méthode Description
ReleaseAll ( ) : void
ReleaseMapping ( IEnumerable mappings ) : void
ReleaseSessionMappings ( ) : void
RenewMapping ( Open.Nat.Mapping mapping ) : System.Threading.Tasks.Task
RenewMappings ( ) : System.Threading.Tasks.Task
Touch ( ) : void

Method Details

CreatePortMapAsync() public abstract méthode

Creates the port map asynchronous.
MappingException
public abstract CreatePortMapAsync ( Open.Nat.Mapping mapping ) : System.Threading.Tasks.Task
mapping Open.Nat.Mapping The Mapping entry.
Résultat System.Threading.Tasks.Task

DeletePortMapAsync() public abstract méthode

Deletes a mapped port asynchronous.
MappingException-class
public abstract DeletePortMapAsync ( Open.Nat.Mapping mapping ) : System.Threading.Tasks.Task
mapping Open.Nat.Mapping The Mapping entry.
Résultat System.Threading.Tasks.Task

GetAllMappingsAsync() public abstract méthode

Gets all mappings asynchronous.
MappingException
public abstract GetAllMappingsAsync ( ) : Task>
Résultat Task>

GetExternalIPAsync() public abstract méthode

Gets the external (visible) IP address asynchronous. This is the NAT device IP address
MappingException
public abstract GetExternalIPAsync ( ) : Task
Résultat Task

GetSpecificMappingAsync() public abstract méthode

Gets the specified mapping asynchronous.
public abstract GetSpecificMappingAsync ( Protocol protocol, int port ) : Task
protocol Protocol The protocol.
port int The port.
Résultat Task

RegisterMapping() protected méthode

protected RegisterMapping ( Open.Nat.Mapping mapping ) : void
mapping Open.Nat.Mapping
Résultat void

UnregisterMapping() protected méthode

protected UnregisterMapping ( Open.Nat.Mapping mapping ) : void
mapping Open.Nat.Mapping
Résultat void