A message that holds an SdpMessage More...
Inherits NobleConnect.IMessage.
Public Member Functions | |
Message (MessageType messageType, SdpMessage payload) | |
Message (MessageType messageType, SdpMessage payload, ReadOnlyByteArray transactionID) | |
Message (byte[] response, int index, int count) | |
Construct a message from some bytes More... | |
void | Serialize (BufferView buffer) |
Serialize the message to a buffer More... | |
byte[] | AsBytes () |
override string | ToString () |
Get a human readable representation of the Message More... | |
Static Public Member Functions | |
static bool | IsSDPMessage (byte[] buffer, int index, int count) |
Determine whether or not some bytes look like an sdp message More... | |
static ReadOnlyByteArray | NextTransactionID () |
Get a fresh transaction ID More... | |
Public Attributes | |
MessageType | messageType |
SdpMessage | payload |
Properties | |
override ReadOnlyByteArray | TransactionID [get] |
A message that holds an SdpMessage
Message format is:
Message header: 6 bytes 4 for cookie 1 for message type 1 for transaction id
Sdp header: 40 or 52 bytes 1 for is IPv6 4 or 16 for address 2 for port 16 for username guid 16 for password guid 1 for number of candidates
Candidates: 24 or 36 or 42 bytes per candidate 16 for foundation 1 for local preference 1 for candidateType, isIPv6, and isDualStack 4 or 16 for address 2 for port (4 or 16 for address) (2 for port)
NobleConnect.Sdp.Message.Message | ( | MessageType | messageType, |
SdpMessage | payload | ||
) |
NobleConnect.Sdp.Message.Message | ( | MessageType | messageType, |
SdpMessage | payload, | ||
ReadOnlyByteArray | transactionID | ||
) |
NobleConnect.Sdp.Message.Message | ( | byte[] | response, |
int | index, | ||
int | count | ||
) |
Construct a message from some bytes
response | |
index | |
count |
byte [] NobleConnect.Sdp.Message.AsBytes | ( | ) |
|
static |
Determine whether or not some bytes look like an sdp message
Size of message must be large enough for header and at least one candidate of maximum size (the dual stack relay). Cookie must match, message type and isIPv6 byte must be valid. Remaining message size must be sane given number of candidates. First candidate must look valid
buffer | |
index | |
count |
|
static |
Get a fresh transaction ID
void NobleConnect.Sdp.Message.Serialize | ( | BufferView | buffer | ) |
Serialize the message to a buffer
buffer |
override string NobleConnect.Sdp.Message.ToString | ( | ) |
Get a human readable representation of the Message
This is not what is sent over the network. Just useful for debugging.
MessageType NobleConnect.Sdp.Message.messageType |
SdpMessage NobleConnect.Sdp.Message.payload |
|
get |