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

Method Deserialize

windowUpdate.go:36–45  ·  view source on GitHub ↗
(fr *FrameHeader)

Source from the content-addressed store, hash-verified

34}
35
36func (wu *WindowUpdate) Deserialize(fr *FrameHeader) error {
37 if len(fr.payload) < 4 {
38 wu.increment = 0
39 return ErrMissingBytes
40 }
41
42 wu.increment = int(http2utils.BytesToUint32(fr.payload) & (1<<31 - 1))
43
44 return nil
45}
46
47func (wu *WindowUpdate) Serialize(fr *FrameHeader) {
48 fr.payload = http2utils.AppendUint32Bytes(

Callers

nothing calls this directly

Calls 1

BytesToUint32Function · 0.92

Tested by

no test coverage detected