public SctpCauseOnlyError(SctpErrorCauseCode causeCode) { if (!SupportedErrorCauses.Contains(causeCode)) { throw new ApplicationException($"SCTP error struct should not be used for {causeCode}, use the specific error type."); } CauseCode = causeCode; }
/// <summary> /// Creates a new ERROR chunk. /// </summary> /// <param name="errorCauseCode">The initial error cause code to set on this chunk.</param> public SctpErrorChunk(SctpErrorCauseCode errorCauseCode) : this(new SctpCauseOnlyError(errorCauseCode)) { }