Class LeasedEndpoint
A public endpoint that is rented from a NAT.
Implements
Inherited Members
Namespace: Makaretu.Nat
Assembly: Makaretu.Nat.dll
Syntax
public class LeasedEndpoint : IPEndPoint, IDisposable
Remarks
CreatePublicEndpointAsync(ProtocolType, Int32) is used to create a Lease.
A background task is created to renew the lease every Lifetime / 2. Use Dispose() to cancel the task.
Constructors
| Improve this Doc View SourceLeasedEndpoint(Lease)
Create a new instance of the LeasedEndpoint class from the specified Lease.
Declaration
public LeasedEndpoint(Lease lease)
Parameters
Type | Name | Description |
---|---|---|
Lease | lease | An agreement for a public endpoint. |
See Also
Properties
| Improve this Doc View SourceLease
The lease agreement.
Declaration
public Lease Lease { get; }
Property Value
Type | Description |
---|---|
Lease |
Methods
| Improve this Doc View SourceDispose()
Stops the renewal process and deletes the public endpoint.
Declaration
public void Dispose()
See Also
Events
| Improve this Doc View SourceChanged
Raised when the lease is renewed and the public address and/or port changes.
Declaration
public event EventHandler<LeasedEndpointEventArgs> Changed
Event Type
Type | Description |
---|---|
EventHandler<LeasedEndpointEventArgs> |