mirror of
https://github.com/pion/webrtc.git
synced 2025-11-01 03:04:06 +08:00
We need to also store the raw including header for easier access instead of remarshaling every time
19 lines
381 B
Go
19 lines
381 B
Go
package sctp
|
|
|
|
type ParamUnrecognizedParameter struct {
|
|
ParamHeader
|
|
RawParams []byte
|
|
}
|
|
|
|
func (f *ParamUnrecognizedParameter) Marshal() ([]byte, error) {
|
|
f.typ = UnrecognizedParam
|
|
f.raw = f.RawParams
|
|
return f.ParamHeader.Marshal()
|
|
}
|
|
|
|
func (f *ParamUnrecognizedParameter) Unmarshal(raw []byte) (Param, error) {
|
|
f.ParamHeader.Unmarshal(raw)
|
|
f.RawParams = f.raw
|
|
return f, nil
|
|
}
|