WriteRSTStream writes a RST_STREAM frame. It will perform exactly one Write to the underlying Writer. It is the caller's responsibility to not call other Write methods concurrently.
(streamID uint32, code ErrCode)
| 1262 | // It will perform exactly one Write to the underlying Writer. |
| 1263 | // It is the caller's responsibility to not call other Write methods concurrently. |
| 1264 | func (h2f *Framer) WriteRSTStream(streamID uint32, code ErrCode) error { |
| 1265 | if !validStreamID(streamID) && !h2f.AllowIllegalWrites { |
| 1266 | return errStreamID |
| 1267 | } |
| 1268 | h2f.startWrite(FrameRSTStream, 0, streamID) |
| 1269 | h2f.writeUint32(uint32(code)) |
| 1270 | return h2f.endWrite() |
| 1271 | } |
| 1272 | |
| 1273 | // A ContinuationFrame is used to continue a sequence of header block fragments. |
| 1274 | // See https://httpwg.org/specs/rfc7540.html#rfc.section.6.10 |
no test coverage detected