Source File
chunk_cookie_echo.go
Belonging Package
github.com/pion/sctp
// SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>// SPDX-License-Identifier: MITpackage sctpimport ()/*CookieEcho represents an SCTP Chunk of type CookieEcho0 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+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+| Type = 10 |Chunk Flags | Length |+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+| Cookie || |+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+*/type chunkCookieEcho struct {chunkHeadercookie []byte}// Cookie echo chunk errors.var (ErrChunkTypeNotCookieEcho = errors.New("ChunkType is not of type COOKIEECHO"))func ( *chunkCookieEcho) ( []byte) error {if := .chunkHeader.unmarshal(); != nil {return}if .typ != ctCookieEcho {return fmt.Errorf("%w: actually is %s", ErrChunkTypeNotCookieEcho, .typ.String())}.cookie = .rawreturn nil}func ( *chunkCookieEcho) () ([]byte, error) {.chunkHeader.typ = ctCookieEcho.chunkHeader.raw = .cookiereturn .chunkHeader.marshal()}func ( *chunkCookieEcho) () ( bool, error) {return false, nil}
![]() |
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. |