The CHANGE-REQUEST attribute contains two flags to control the IP address and port that the server uses to send the response. More...
Inherits NobleConnect.Stun.Attribute.
Public Member Functions | |
AttributeChangeRequest (bool changeIP, bool changePort) | |
Construct an AttributeChangeRequest using the provided flags More... | |
override void | SerializeValues (BufferView buffer, ReadOnlyByteArray transactionID) |
Transform the string into an ArraySegment of bytes to be sent over the network. More... | |
override ushort | GetValueSize () |
Get the serialized size of the attribute values More... | |
![]() | |
Attribute (AttributeType type) | |
Construct an Attribute of the provided AttributeType More... | |
Attribute (AttributeType type, ref int offset) | |
void | Serialize (BufferView buffer, ReadOnlyByteArray transactionID) |
Convert this attribute to a bunch of bytes and add them to the provided buffer More... | |
ushort | GetSize () |
Public Attributes | |
readonly bool | changeIP |
Used to instruct the server to send the binding response from the alternative IP. More... | |
readonly bool | changePort |
Used to instruct the server to send the binding response from the alternative port. More... | |
![]() | |
readonly AttributeType | attributeType |
The AttributeType of this Attribute More... | |
Additional Inherited Members | |
![]() | |
static ushort | DeserializeLength (byte[] buffer, ref int offset) |
Read the Attribute length from a byte array. More... | |
static ushort | GetNumPaddingBytes (int length) |
Calculate padding based on length More... | |
![]() | |
const int | HEADER_SIZE = 4 |
The CHANGE-REQUEST attribute contains two flags to control the IP address and port that the server uses to send the response.
These flags are called the "change IP" and "change port" flags. The CHANGE-REQUEST attribute is allowed only in Binding Requests. The "change IP" and "change port" flags are useful for determining the current filtering behavior of a NAT. They instruct the server to send the Binding Responses from the alternate source IP address and/or alternate port.
NobleConnect.Stun.AttributeChangeRequest.AttributeChangeRequest | ( | bool | changeIP, |
bool | changePort | ||
) |
Construct an AttributeChangeRequest using the provided flags
This is called when constructing an Attribute to send to a Stun server.
errorCode | |
errorMessage |
|
virtual |
Get the serialized size of the attribute values
Reimplemented from NobleConnect.Stun.Attribute.
|
virtual |
Transform the string into an ArraySegment of bytes to be sent over the network.
Uses UTF8 encoding
Reimplemented from NobleConnect.Stun.Attribute.
readonly bool NobleConnect.Stun.AttributeChangeRequest.changeIP |
Used to instruct the server to send the binding response from the alternative IP.
readonly bool NobleConnect.Stun.AttributeChangeRequest.changePort |
Used to instruct the server to send the binding response from the alternative port.