Class MappedAddressAttribute
The MAPPED-ADDRESS attribute indicates a reflexive transport address of the client. It consists of an 8-bit address family and a 16-bit port, followed by a fixed-length value representing the IP address. If the address family is IPv4, the address MUST be 32 bits. If the address family is IPv6, the address MUST be 128 bits. All fields must be in network byte order.
Inherited Members
Namespace: FM.LiveSwitch.Stun
Assembly: FM.LiveSwitch.dll
Syntax
public class MappedAddressAttribute : Attribute
Constructors
MappedAddressAttribute(String, Int32)
Initializes a new instance of the MappedAddressAttribute class.
Declaration
public MappedAddressAttribute(string ipAddress, int port)
Parameters
Type | Name | Description |
---|---|---|
System.String | ipAddress | The IP address. |
System.Int32 | port | The port. |
Properties
IPAddress
Gets or sets the IP address.
Declaration
public string IPAddress { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Port
Gets or sets the port.
Declaration
public int Port { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
TypeValue
Gets the type value.
Declaration
public override int TypeValue { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Overrides
Methods
GetValueLength()
Gets the length of the value.
Declaration
protected override int GetValueLength()
Returns
Type | Description |
---|---|
System.Int32 |
Overrides
ReadValueFrom(DataBuffer, Int32)
Initializes a new instance of the MappedAddressAttribute class.
Declaration
public static MappedAddressAttribute ReadValueFrom(DataBuffer buffer, int offset)
Parameters
Type | Name | Description |
---|---|---|
DataBuffer | buffer | The buffer. |
System.Int32 | offset | The offset. |
Returns
Type | Description |
---|---|
MappedAddressAttribute |
ToString()
Returns a string that represents this instance.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String | A string that represents this instance. |
Overrides
WriteValueTo(DataBuffer, Int32)
Writes the value to.
Declaration
protected override void WriteValueTo(DataBuffer buffer, int offset)
Parameters
Type | Name | Description |
---|---|---|
DataBuffer | buffer | The buffer. |
System.Int32 | offset | The offset. |