예제 #1
0
func (t *http2Server) handleSettings(f *http2.SettingsFrame) {
	if f.IsAck() {
		return
	}
	var ss []http2.Setting
	f.ForeachSetting(func(s http2.Setting) error {
		ss = append(ss, s)
		return nil
	})
	// The settings will be applied once the ack is sent.
	t.controlBuf.put(&settings{ack: true, ss: ss})
}
예제 #2
0
func (conn *http2Connection) handleSettings(frame *http2.SettingsFrame) {
	if frame.IsAck() {
		return
	}
	var settingsList []http2.Setting
	frame.ForeachSetting(func(setting http2.Setting) error {
		settingsList = append(settingsList, setting)
		return nil
	})
	// The settings will be applied once the ack is sent.
	conn.controlBuffer.Put(&settings{
		ack:      true,
		settings: settingsList,
	})
}