Any Attribute that holds a byte array More...
Inherits NobleConnect.Stun.Attribute.
Public Member Functions | |
AttributeRaw (AttributeType attributeType, byte[] value) | |
Construct an AttributeRaw of the provided AttributeType using the provided byte array. More... | |
AttributeRaw (AttributeType type, byte[] buffer, ref int offset) | |
Construct an AttributeRaw from the provided byte array More... | |
override void | SerializeValues (BufferView buffer, ReadOnlyByteArray transactionID) |
Transform the byte array 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 ReadOnlyCollection< byte > | value |
The byte[] value 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 |
Any Attribute that holds a byte array
NobleConnect.Stun.AttributeRaw.AttributeRaw | ( | AttributeType | attributeType, |
byte[] | value | ||
) |
Construct an AttributeRaw of the provided AttributeType using the provided byte array.
This is called when constructing an Attribute to send to a Stun server.
attributeType | |
value |
NobleConnect.Stun.AttributeRaw.AttributeRaw | ( | AttributeType | type, |
byte[] | buffer, | ||
ref int | offset | ||
) |
Construct an AttributeRaw from the provided byte array
This is called when deserializing an AttributeRaw received from a Stun server.
type | |
buffer | |
offset |
|
virtual |
Get the serialized size of the attribute values
Reimplemented from NobleConnect.Stun.Attribute.
|
virtual |
Transform the byte array into an ArraySegment of bytes to be sent over the network.
Reimplemented from NobleConnect.Stun.Attribute.
readonly ReadOnlyCollection<byte> NobleConnect.Stun.AttributeRaw.value |
The byte[] value