package http2
import (
"fmt"
)
type SettingID uint16
const (
SettingHeaderTableSize SettingID = 0x1
SettingEnablePush SettingID = 0x2
SettingMaxConcurrentStreams SettingID = 0x3
SettingInitialWindowSize SettingID = 0x4
SettingMaxFrameSize SettingID = 0x5
SettingMaxHeaderListSize SettingID = 0x6
)
var settingName = map [SettingID ]string {
SettingHeaderTableSize : "HEADER_TABLE_SIZE" ,
SettingEnablePush : "ENABLE_PUSH" ,
SettingMaxConcurrentStreams : "MAX_CONCURRENT_STREAMS" ,
SettingInitialWindowSize : "INITIAL_WINDOW_SIZE" ,
SettingMaxFrameSize : "MAX_FRAME_SIZE" ,
SettingMaxHeaderListSize : "MAX_HEADER_LIST_SIZE" ,
}
func (s SettingID ) String () string {
if v , ok := settingName [s ]; ok {
return v
}
return fmt .Sprintf ("UNKNOWN_SETTING_%d" , uint16 (s ))
}
type Setting struct {
ID SettingID
Val uint32
}
func (s Setting ) String () string {
return fmt .Sprintf ("[%v = %d]" , s .ID , s .Val )
}
The pages are generated with Golds v0.8.7 . (GOOS=linux GOARCH=amd64)
Golds is a Go 101 project developed by Tapir Liu .
PR and bug reports are welcome and can be submitted to the issue list .
Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds .