MCPcopy Create free account
hub / github.com/dgrr/http2 / Deserialize

Method Deserialize

rststream.go:40–48  ·  view source on GitHub ↗
(fr *FrameHeader)

Source from the content-addressed store, hash-verified

38}
39
40func (rst *RstStream) Deserialize(fr *FrameHeader) error {
41 if len(fr.payload) < 4 {
42 return ErrMissingBytes
43 }
44
45 rst.code = ErrorCode(http2utils.BytesToUint32(fr.payload))
46
47 return nil
48}
49
50func (rst *RstStream) Serialize(fr *FrameHeader) {
51 fr.payload = http2utils.AppendUint32Bytes(fr.payload[:0], uint32(rst.code))

Callers

nothing calls this directly

Calls 2

BytesToUint32Function · 0.92
ErrorCodeTypeAlias · 0.85

Tested by

no test coverage detected