Struct DataChannelOpenMessage
Represents a Data Channel Establishment Protocol (DECP) OPEN message. This message is initially sent using the data channel on the stream used for user messages.
Inherited Members
Namespace: SIPSorcery.Net
Assembly: SIPSorcery.dll
Syntax
public struct DataChannelOpenMessage
Remarks
Fields
| Improve this Doc View SourceChannelType
This field specifies the type of data channel to be opened. For a list of the formal options DataChannelTypes.
Declaration
public byte ChannelType
Field Value
Type | Description |
---|---|
System.Byte |
DCEP_OPEN_FIXED_PARAMETERS_LENGTH
Declaration
public const int DCEP_OPEN_FIXED_PARAMETERS_LENGTH = 12
Field Value
Type | Description |
---|---|
System.Int32 |
Label
The name of the data channel. May be an empty string.
Declaration
public string Label
Field Value
Type | Description |
---|---|
System.String |
MessageType
This field holds the IANA-defined message type for the DATA_CHANNEL_OPEN message.The value of this field is 0x03.
Declaration
public byte MessageType
Field Value
Type | Description |
---|---|
System.Byte |
Priority
The priority of the data channel.
Declaration
public ushort Priority
Field Value
Type | Description |
---|---|
System.UInt16 |
Protocol
If it is a non-empty string, it specifies a protocol registered in the "WebSocket Subprotocol Name Registry" created in RFC6455.
Declaration
public string Protocol
Field Value
Type | Description |
---|---|
System.String |
Remarks
The websocket subprotocol names and specification are available at https://tools.ietf.org/html/rfc7118
Reliability
Used to set tolerance for partially reliable data channels.
Declaration
public uint Reliability
Field Value
Type | Description |
---|---|
System.UInt32 |
Methods
| Improve this Doc View SourceGetBytes()
Serialises the DCEP OPEN message to a buffer.
Declaration
public byte[] GetBytes()
Returns
Type | Description |
---|---|
System.Byte[] |
GetLength()
Gets the length of the serialised DCEP OPEN message.
Declaration
public int GetLength()
Returns
Type | Description |
---|---|
System.Int32 | The serialised length of this DECEP OPEN message. |
Parse(Byte[], Int32)
Parses the an DCEP open message from a buffer.
Declaration
public static DataChannelOpenMessage Parse(byte[] buffer, int posn)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | buffer | The buffer to parse the message from. |
System.Int32 | posn | The position in the buffer to start parsing from. |
Returns
Type | Description |
---|---|
DataChannelOpenMessage | A new DCEP open message instance. |
WriteTo(Byte[], Int32)
Serialises a Data Channel Establishment Protocol (DECP) OPEN message to a pre-allocated buffer.
Declaration
public ushort WriteTo(byte[] buffer, int posn)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | buffer | The buffer to write the serialised chunk bytes to. It must have the required space already allocated. |
System.Int32 | posn | The position in the buffer to write to. |
Returns
Type | Description |
---|---|
System.UInt16 | The number of bytes, including padding, written to the buffer. |