MCPcopy Create free account
hub / github.com/imroc/req / Setting

Method Setting

internal/http2/frame.go:828–834  ·  view source on GitHub ↗

Setting returns the setting from the frame at the given 0-based index. The index must be >= 0 and less than f.NumSettings().

(i int)

Source from the content-addressed store, hash-verified

826// Setting returns the setting from the frame at the given 0-based index.
827// The index must be >= 0 and less than f.NumSettings().
828func (f *SettingsFrame) Setting(i int) http2.Setting {
829 buf := f.p
830 return http2.Setting{
831 ID: http2.SettingID(binary.BigEndian.Uint16(buf[i*6 : i*6+2])),
832 Val: binary.BigEndian.Uint32(buf[i*6+2 : i*6+6]),
833 }
834}
835
836func (f *SettingsFrame) NumSettings() int { return len(f.p) / 6 }
837

Callers 4

ValueMethod · 0.95
HasDuplicatesMethod · 0.95
ForeachSettingMethod · 0.95

Calls 1

SettingIDTypeAlias · 0.92

Tested by 1