(maxStreamID uint32, code ErrCode, debugData []byte)
| 972 | } |
| 973 | |
| 974 | func (h2f *Framer) WriteGoAway(maxStreamID uint32, code ErrCode, debugData []byte) error { |
| 975 | h2f.startWrite(FrameGoAway, 0, 0) |
| 976 | h2f.writeUint32(maxStreamID & (1<<31 - 1)) |
| 977 | h2f.writeUint32(uint32(code)) |
| 978 | h2f.writeBytes(debugData) |
| 979 | return h2f.endWrite() |
| 980 | } |
| 981 | |
| 982 | // An UnknownFrame is the frame type returned when the frame type is unknown |
| 983 | // or no specific frame type parser exists. |