Source File
error_cause_user_initiated_abort.go
Belonging Package
github.com/pion/sctp
// SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>// SPDX-License-Identifier: MITpackage sctpimport ()/*This error cause MAY be included in ABORT chunks that are sentbecause of an upper-layer request. The upper layer can specify anUpper Layer Abort Reason that is transported by SCTP transparentlyand MAY be delivered to the upper-layer protocol at the peer.0 1 2 30 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+| Cause Code=12 | Cause Length=Variable |+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+/ Upper Layer Abort Reason /\ \+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+*/type errorCauseUserInitiatedAbort struct {errorCauseHeaderupperLayerAbortReason []byte}func ( *errorCauseUserInitiatedAbort) () ([]byte, error) {.code = userInitiatedAbort.errorCauseHeader.raw = .upperLayerAbortReasonreturn .errorCauseHeader.marshal()}func ( *errorCauseUserInitiatedAbort) ( []byte) error {:= .errorCauseHeader.unmarshal()if != nil {return}.upperLayerAbortReason = .errorCauseHeader.rawreturn nil}// String makes errorCauseUserInitiatedAbort printable.func ( *errorCauseUserInitiatedAbort) () string {return fmt.Sprintf("%s: %s", .errorCauseHeader.String(), .upperLayerAbortReason)}
![]() |
The pages are generated with Golds v0.8.2. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds. |