Class MapRequest
Request that an external port is mapped to an internal port.
Implements
Inherited Members
Namespace: Makaretu.Nat.Pmp
Assembly: Makaretu.Nat.dll
Syntax
public class MapRequest : Message, ICloneable
Properties
| Improve this Doc View SourceInternalPort
The local port on which the client is listening.
Declaration
public ushort InternalPort { get; set; }
Property Value
Type | Description |
---|---|
UInt16 |
Lifetime
How long to reserve the mapping.
Declaration
public TimeSpan Lifetime { get; set; }
Property Value
Type | Description |
---|---|
TimeSpan | Defaults to 2 hours. |
PreferredExternalPort
Preferred external port.
Declaration
public ushort PreferredExternalPort { get; set; }
Property Value
Type | Description |
---|---|
UInt16 | If zero, then NAT assigns a random port number. |
Remarks
The NAT can ignore the external port and assign it own value.
Methods
| Improve this Doc View SourceWrite(NatWriter)
Writes the NAT message.
Declaration
public override void Write(NatWriter writer)
Parameters
Type | Name | Description |
---|---|---|
NatWriter | writer | The destination for the NAT message. |
Overrides
Remarks
Derived classes must override this.