WriteSettings writes a SETTINGS frame with zero or more settings specified and the ACK bit not set. It will perform exactly one Write to the underlying Writer. It is the caller's responsibility to not call other Write methods concurrently.
(settings ...http2.Setting)
| 884 | // It will perform exactly one Write to the underlying Writer. |
| 885 | // It is the caller's responsibility to not call other Write methods concurrently. |
| 886 | func (h2f *Framer) WriteSettings(settings ...http2.Setting) error { |
| 887 | h2f.startWrite(FrameSettings, 0, 0) |
| 888 | for _, s := range settings { |
| 889 | h2f.writeUint16(uint16(s.ID)) |
| 890 | h2f.writeUint32(s.Val) |
| 891 | } |
| 892 | return h2f.endWrite() |
| 893 | } |
| 894 | |
| 895 | // WriteSettingsAck writes an empty SETTINGS frame with the ACK bit set. |
| 896 | // |