Class EvenPortAttribute
This attribute allows the client to request that the port in the relayed transport address be even, and (optionally) that the server reserve the next-higher port number.
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: FM.LiveSwitch.Stun.Turn
Assembly: FM.LiveSwitch.dll
Syntax
public class EvenPortAttribute : Attribute
Constructors
EvenPortAttribute(Boolean)
Initializes a new instance of the EvenPortAttribute class.
Declaration
public EvenPortAttribute(bool reserveNextHigher)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Boolean | reserveNextHigher | Whether the server should reserve the next-higher port number. |
Properties
ReserveNextHigher
Gets or sets whether the server should reserve the next-higher port number.
Declaration
public bool ReserveNextHigher { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
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 attribute value.
Declaration
protected override int GetValueLength()
Returns
| Type | Description |
|---|---|
| System.Int32 |
Overrides
ReadValueFrom(DataBuffer, Int32)
Initializes a new instance of the EvenPortAttribute class.
Declaration
public static EvenPortAttribute ReadValueFrom(DataBuffer buffer, int offset)
Parameters
| Type | Name | Description |
|---|---|---|
| DataBuffer | buffer | The buffer. |
| System.Int32 | offset | The offset. |
Returns
| Type | Description |
|---|---|
| EvenPortAttribute |
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
System.Object.ToString()
WriteValueTo(DataBuffer, Int32)
Writes the attribute value to a data buffer.
Declaration
protected override void WriteValueTo(DataBuffer buffer, int offset)
Parameters
| Type | Name | Description |
|---|---|---|
| DataBuffer | buffer | The buffer. |
| System.Int32 | offset | The offset. |