Class SctpErrorChunk
An endpoint sends this chunk to its peer endpoint to notify it of certain error conditions. It contains one or more error causes. An Operation Error is not considered fatal in and of itself, but may be used with an ABORT chunk to report a fatal condition.
Inherited Members
Namespace: SIPSorcery.Net
Assembly: SIPSorcery.dll
Syntax
public class SctpErrorChunk : SctpChunk
Constructors
| Improve this Doc View SourceSctpErrorChunk()
Declaration
public SctpErrorChunk()
SctpErrorChunk(ISctpErrorCause)
Creates a new ERROR chunk.
Declaration
public SctpErrorChunk(ISctpErrorCause errorCause)
Parameters
| Type | Name | Description |
|---|---|---|
| ISctpErrorCause | errorCause | The initial error cause to set on this chunk. |
SctpErrorChunk(SctpChunkType, Boolean)
This constructor is for the ABORT chunk type which is identical to the ERROR chunk except for the optional verification tag bit.
Declaration
protected SctpErrorChunk(SctpChunkType chunkType, bool verificationTagBit)
Parameters
| Type | Name | Description |
|---|---|---|
| SctpChunkType | chunkType | The chunk type, typically ABORT. |
| System.Boolean | verificationTagBit |
SctpErrorChunk(SctpErrorCauseCode)
Creates a new ERROR chunk.
Declaration
public SctpErrorChunk(SctpErrorCauseCode errorCauseCode)
Parameters
| Type | Name | Description |
|---|---|---|
| SctpErrorCauseCode | errorCauseCode | The initial error cause code to set on this chunk. |
Properties
| Improve this Doc View SourceErrorCauses
Declaration
public List<ISctpErrorCause> ErrorCauses { get; }
Property Value
| Type | Description |
|---|---|
| System.Collections.Generic.List<ISctpErrorCause> |
Methods
| Improve this Doc View SourceAddErrorCause(ISctpErrorCause)
Adds an additional error cause parameter to the chunk.
Declaration
public void AddErrorCause(ISctpErrorCause errorCause)
Parameters
| Type | Name | Description |
|---|---|---|
| ISctpErrorCause | errorCause | The additional error cause to add to the chunk. |
GetChunkLength(Boolean)
Calculates the length for the chunk.
Declaration
public override ushort GetChunkLength(bool padded)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Boolean | padded | If true the length field will be padded to a 4 byte boundary. |
Returns
| Type | Description |
|---|---|
| System.UInt16 | The padded length of the chunk. |
Overrides
| Improve this Doc View SourceParseChunk(Byte[], Int32, Boolean)
Parses the ERROR chunk fields.
Declaration
public static SctpErrorChunk ParseChunk(byte[] buffer, int posn, bool isAbort)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Byte[] | buffer | The buffer holding the serialised chunk. |
| System.Int32 | posn | The position to start parsing at. |
| System.Boolean | isAbort |
Returns
| Type | Description |
|---|---|
| SctpErrorChunk |
WriteTo(Byte[], Int32)
Serialises the ERROR chunk to a pre-allocated buffer.
Declaration
public override 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. |