Close closes the stream and propagates err to any readers.
(err error)
| 99 | |
| 100 | // Close closes the stream and propagates err to any readers. |
| 101 | func (s *ClientStream) Close(err error) { |
| 102 | var ( |
| 103 | rst bool |
| 104 | rstCode http2.ErrCode |
| 105 | ) |
| 106 | if err != nil { |
| 107 | rst = true |
| 108 | rstCode = http2.ErrCodeCancel |
| 109 | } |
| 110 | s.ct.closeStream(s, err, rst, rstCode, status.Convert(err), nil, false) |
| 111 | } |
| 112 | |
| 113 | // Write writes the hdr and data bytes to the output stream. |
| 114 | func (s *ClientStream) Write(hdr []byte, data mem.BufferSlice, opts *WriteOptions) error { |
no test coverage detected