Debian Codegraph @

param_heartbeat_info.go

raw
1 // SPDX-FileCopyrightText: 2026 The Pion community <https://pion.ly>
2 // SPDX-License-Identifier: MIT
3
4 package sctp
5
6 type paramHeartbeatInfo struct {
7 paramHeader
8 heartbeatInformation []byte
9 }
10
11 func (h *paramHeartbeatInfo) marshal() ([]byte, error) {
12 h.typ = heartbeatInfo
13 h.raw = h.heartbeatInformation
14
15 return h.paramHeader.marshal()
16 }
17
18 func (h *paramHeartbeatInfo) unmarshal(raw []byte) (param, error) {
19 err := h.paramHeader.unmarshal(raw)
20 if err != nil {
21 return nil, err
22 }
23 h.heartbeatInformation = h.raw
24
25 return h, nil
26 }