Ice Attribute Types are defined in RFC 5245 Section 19.1 and 21.2 More...
Inherits NobleConnect.Stun.AttributeType.
Public Member Functions | |
AttributeType (ushort value) | |
Construct an AttributeType with the provided value More... | |
![]() | |
AttributeType (ushort value) | |
Construct an AttributeType with the provided value More... | |
override bool | Equals (object obj) |
Compare two AttributeTypes objects using their values More... | |
override int | GetHashCode () |
Calculate a hash for this AttributeType using the value. More... | |
Static Public Member Functions | |
static implicit | operator ushort (AttributeType a) |
Converts an AttributeType to an unsigned short by returning the value More... | |
static | operator AttributeType (ushort a) |
Convert an unsigned short to an AttributeType by constructing a new AttributeType and passing in the value More... | |
new static Stun.Attribute | CreateAttribute (byte[] buffer, int bufferIndex, ReadOnlyByteArray transactionID) |
Construct an Attribute from the provided byte array. More... | |
![]() | |
static Attribute | CreateAttribute (byte[] buffer, int bufferIndex, ReadOnlyByteArray transactionID) |
Construct an Attribute from the provided byte array. More... | |
static implicit | operator ushort (AttributeType a) |
Converts an AttributeType to an unsigned short by returning the value More... | |
static | operator AttributeType (ushort a) |
Convert an unsigned short to an AttributeType by constructing a new AttributeType and passing in the value More... | |
static bool | operator== (AttributeType a, AttributeType b) |
Compare two AttributeTypes using their values More... | |
static bool | operator!= (AttributeType a, AttributeType b) |
Compare two AttributeTypes using their values More... | |
Static Public Attributes | |
static readonly AttributeType | Priority = new AttributeType(PRIORITY) |
static readonly AttributeType | UseCandidate = new AttributeType(USE_CANDIDATE) |
static readonly AttributeType | IceControlled = new AttributeType(ICE_CONTROLLED) |
static readonly AttributeType | IceControlling = new AttributeType(ICE_CONTROLLING) |
static readonly AttributeType | Bandwidth = new AttributeType(BANDWIDTH) |
![]() | |
const ushort | SIZE = 2 |
Serialiazed size in bytes More... | |
static readonly AttributeType | MappedAddress = new AttributeType(MAPPED_ADDRESS) |
This attribute type is used to hold an ip address and port. It is returned in response to a Bind Request and probably for other things. More... | |
static readonly AttributeType | Username = new AttributeType(USERNAME) |
This attribute type is used to hold the Stun username used for authentication. More... | |
static readonly AttributeType | MessageIntegrity = new AttributeType(MESSAGE_INTEGRITY) |
This attribute type is used to hold an array of bytes that is used to confirm the integrity of messages. More... | |
static readonly AttributeType | ErrorCode = new AttributeType(ERROR_CODE) |
This attribute type is used to hold an error code and message. More... | |
static readonly AttributeType | UnknownAttributes = new AttributeType(UNKNOWN_ATTRIBUTES) |
This attribute type is used to hold a list of unknown attributes so the server can let us know if it didn't recognize something we sent. More... | |
static readonly AttributeType | Realm = new AttributeType(REALM) |
This attribute type is used to hold a string representing the "realm" the server is in. This is can be used as a hint to let us know which credentials to use. More... | |
static readonly AttributeType | Nonce = new AttributeType(NONCE) |
This attribute type is used to hold nonce value that is used as part of message validation. More... | |
static readonly AttributeType | XORMappedAddress = new AttributeType(XOR_MAPPED_ADDRESS) |
This attribute type is used to hold an ip address and port. It is returned in response to a Bind Request and probably for other things. More... | |
static readonly AttributeType | ChangeRequest = new AttributeType(CHANGE_REQUEST) |
This attribute type is used in Bind Requests as part of NAT Behaviour Discovery. More... | |
static readonly AttributeType | Padding = new AttributeType(PADDING) |
This attribute type is used for padding messages to force fragmentation as part of NAT Behaviour discovery. More... | |
static readonly AttributeType | ResponsePort = new AttributeType(RESPONSE_PORT) |
This attribute type is used for binding lifetime discovery and maybe other things. More... | |
static readonly AttributeType | Software = new AttributeType(SOFTWARE) |
This attribute type has no impact on operation of the protocol, and serves only as a tool for diagnostic and debugging purposes More... | |
static readonly AttributeType | AlternateServer = new AttributeType(ALTERNATE_SERVER) |
This attribute type is used to handle redirects to another Stun server. Maybe useful for load balancing. More... | |
static readonly AttributeType | Fingerprint = new AttributeType(FINGERPRINT) |
This attribute type contains a string that is used to identify this message as a Stun message. More... | |
static readonly AttributeType | ResponseOrigin = new AttributeType(RESPONSE_ORIGIN) |
This attribute type is used for detecting double-NAT configurations More... | |
static readonly AttributeType | OtherAddress = new AttributeType(OTHER_ADDRESS) |
This attribute type is returned in Bind Responses as part of NAT Behaviour Discovery. More... | |
static readonly AttributeType | Origin = new AttributeType(ORIGIN) |
Origin address used so that the server knows which realm to authenticate with. More... | |
Additional Inherited Members | |
![]() | |
readonly ushort | value |
The actual integer value of this AttributeType as defined in the relavent RFC's More... | |
Ice Attribute Types are defined in RFC 5245 Section 19.1 and 21.2
I would have preferred this to be an enum, but it needs to be extendable for Turn and Ice. So instead it is this weird enum-like class that exposes static instances of itself for each different AttributeType.
NobleConnect.Ice.AttributeType.AttributeType | ( | ushort | value | ) |
Construct an AttributeType with the provided value
value |
|
static |
Construct an Attribute from the provided byte array.
First the AttributeType is read from the byte buffer and then an Attribute of the appropriate class is created via a giant ugly switch statement. Attribute values are deserialized from the remainder of the byte array.
buffer | |
bufferIndex |
|
explicitstatic |
Convert an unsigned short to an AttributeType by constructing a new AttributeType and passing in the value
a |
|
static |
Converts an AttributeType to an unsigned short by returning the value
a |
|
static |
|
static |
|
static |
|
static |
|
static |