Show / Hide Table of Contents

Class LeasedEndpoint

A public endpoint that is rented from a NAT.

Inheritance
Object
EndPoint
IPEndPoint
LeasedEndpoint
Implements
IDisposable
Inherited Members
IPEndPoint.MinPort
IPEndPoint.MaxPort
IPEndPoint.ToString()
IPEndPoint.Serialize()
IPEndPoint.Create(SocketAddress)
IPEndPoint.Equals(Object)
IPEndPoint.GetHashCode()
IPEndPoint.AddressFamily
IPEndPoint.Address
IPEndPoint.Port
Object.Equals(Object, Object)
Object.ReferenceEquals(Object, Object)
Object.GetType()
Object.MemberwiseClone()
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 Source

LeasedEndpoint(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
CreatePublicEndpointAsync(ProtocolType, Int32)

Properties

| Improve this Doc View Source

Lease

The lease agreement.

Declaration
public Lease Lease { get; }
Property Value
Type Description
Lease

Methods

| Improve this Doc View Source

Dispose()

Stops the renewal process and deletes the public endpoint.

Declaration
public void Dispose()
See Also
DeletePublicEndpointAsync(Lease)

Events

| Improve this Doc View Source

Changed

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>

Implements

System.IDisposable
  • Improve this Doc
  • View Source
Back to top Generated by DocFX