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

Method parseHeader

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

Source from the content-addressed store, hash-verified

126}
127
128func (f *FrameHeader) parseHeader(header []byte) {
129 http2utils.Uint24ToBytes(header[:3], uint32(f.length)) // 2
130 header[3] = byte(f.kind) // 1
131 header[4] = byte(f.flags) // 1
132 http2utils.Uint32ToBytes(header[5:], f.stream) // 4
133}
134
135func ReadFrameFrom(br *bufio.Reader) (*FrameHeader, error) {
136 fr := AcquireFrameHeader()

Callers 1

WriteToMethod · 0.95

Calls 2

Uint24ToBytesFunction · 0.92
Uint32ToBytesFunction · 0.92

Tested by

no test coverage detected