diff options
| author | Luke <luke.pulverenti@gmail.com> | 2016-12-18 00:44:33 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-12-18 00:44:33 -0500 |
| commit | e7cebb91a73354dc3e0d0b6340c9fbd6511f4406 (patch) | |
| tree | 6f1c368c766c17b7514fe749c0e92e69cd89194a /Mono.Nat/AbstractNatDevice.cs | |
| parent | 025905a3e4d50b9a2e07fbf4ff0a203af6604ced (diff) | |
| parent | aaa027f3229073e9a40756c3157d41af2a442922 (diff) | |
Merge pull request #2350 from MediaBrowser/beta
Beta
Diffstat (limited to 'Mono.Nat/AbstractNatDevice.cs')
| -rw-r--r-- | Mono.Nat/AbstractNatDevice.cs | 45 |
1 files changed, 2 insertions, 43 deletions
diff --git a/Mono.Nat/AbstractNatDevice.cs b/Mono.Nat/AbstractNatDevice.cs index 046cfc10f..1b4216002 100644 --- a/Mono.Nat/AbstractNatDevice.cs +++ b/Mono.Nat/AbstractNatDevice.cs @@ -30,6 +30,7 @@ using System; using System.Collections.Generic; using System.Text; using System.Net; +using System.Threading.Tasks; namespace Mono.Nat { @@ -50,48 +51,6 @@ namespace Mono.Nat set { lastSeen = value; } } - public virtual void CreatePortMap (Mapping mapping) - { - IAsyncResult result = BeginCreatePortMap (mapping, null, null); - EndCreatePortMap(result); - } - - public virtual void DeletePortMap (Mapping mapping) - { - IAsyncResult result = BeginDeletePortMap (mapping, null, mapping); - EndDeletePortMap(result); - } - - public virtual Mapping[] GetAllMappings () - { - IAsyncResult result = BeginGetAllMappings (null, null); - return EndGetAllMappings (result); - } - - public virtual IPAddress GetExternalIP () - { - IAsyncResult result = BeginGetExternalIP(null, null); - return EndGetExternalIP(result); - } - - public virtual Mapping GetSpecificMapping (Protocol protocol, int port) - { - IAsyncResult result = this.BeginGetSpecificMapping (protocol, port, null, null); - return this.EndGetSpecificMapping(result); - } - - public abstract IAsyncResult BeginCreatePortMap(Mapping mapping, AsyncCallback callback, object asyncState); - public abstract IAsyncResult BeginDeletePortMap (Mapping mapping, AsyncCallback callback, object asyncState); - - public abstract IAsyncResult BeginGetAllMappings (AsyncCallback callback, object asyncState); - public abstract IAsyncResult BeginGetExternalIP (AsyncCallback callback, object asyncState); - public abstract IAsyncResult BeginGetSpecificMapping(Protocol protocol, int externalPort, AsyncCallback callback, object asyncState); - - public abstract void EndCreatePortMap (IAsyncResult result); - public abstract void EndDeletePortMap (IAsyncResult result); - - public abstract Mapping[] EndGetAllMappings (IAsyncResult result); - public abstract IPAddress EndGetExternalIP (IAsyncResult result); - public abstract Mapping EndGetSpecificMapping (IAsyncResult result); + public abstract Task CreatePortMap(Mapping mapping); } } |
