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

Method parseValues

frameHeader.go:121–126  ·  view source on GitHub ↗
(header []byte)

Source from the content-addressed store, hash-verified

119}
120
121func (f *FrameHeader) parseValues(header []byte) {
122 f.length = int(http2utils.BytesToUint24(header[:3])) // & (1<<24 - 1) // 3
123 f.kind = FrameType(header[3]) // 1
124 f.flags = FrameFlags(header[4]) // 1
125 f.stream = http2utils.BytesToUint32(header[5:]) & (1<<31 - 1) // 4
126}
127
128func (f *FrameHeader) parseHeader(header []byte) {
129 http2utils.Uint24ToBytes(header[:3], uint32(f.length)) // 2

Callers 1

readFromMethod · 0.95

Calls 4

BytesToUint24Function · 0.92
BytesToUint32Function · 0.92
FrameTypeTypeAlias · 0.85
FrameFlagsTypeAlias · 0.85

Tested by

no test coverage detected