Turn Attribute Types are defined in RFC 5766 Section 14 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 | ChannelNumber = new AttributeType(CHANNEL_NUMBER) |
static readonly AttributeType | Lifetime = new AttributeType(LIFETIME) |
static readonly AttributeType | XORPeerAddress = new AttributeType(XOR_PEER_ADDRESS) |
This attribute type is used to hold a peer's server reflexive ip address and port. More... | |
static readonly AttributeType | Data = new AttributeType(DATA) |
This attribute type is used to hold some data arriving from a peer over a Turn relay. More... | |
static readonly AttributeType | XORRelayedAddress = new AttributeType(XOR_RELAYED_ADDRESS) |
This attribute type is used to hold a the allocated relay address on the Turn server More... | |
static readonly AttributeType | EvenPort = new AttributeType(EVEN_PORT) |
static readonly AttributeType | RequestedTransport = new AttributeType(REQUESTED_TRANSPORT) |
This attribute type is used to request that the server use a particular transport protocol. More... | |
static readonly AttributeType | DontFragment = new AttributeType(DONT_FRAGMENT) |
static readonly AttributeType | ReservationToken = new AttributeType(RESERVATION_TOKEN) |
static readonly AttributeType | SessionGUID = new AttributeType(SESSION_GUID) |
Optional GUID used to identity the session that a peer belongs to. More... | |
static readonly AttributeType | AdditionalAddressFamily = new AttributeType(ADDITIONAL_ADDRESS_FAMILY) |
![]() | |
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... | |
Turn Attribute Types are defined in RFC 5766 Section 14
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.Turn.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 |
This attribute type is used to hold some data arriving from a peer over a Turn relay.
|
static |
|
static |
|
static |
|
static |
This attribute type is used to request that the server use a particular transport protocol.
It is sent with Allocation Requests and it always UDP
|
static |
|
static |
Optional GUID used to identity the session that a peer belongs to.
|
static |
This attribute type is used to hold a peer's server reflexive ip address and port.
It is used to send a peer's address to the Turn server as part of a Permission Request.
|
static |