(code = NGHTTP2_NO_ERROR, callback)
| 2422 | // close, it is still possible to queue up PRIORITY and RST_STREAM frames, |
| 2423 | // but no DATA and HEADERS frames may be sent. |
| 2424 | close(code = NGHTTP2_NO_ERROR, callback) { |
| 2425 | validateInteger(code, 'code', 0, kMaxInt); |
| 2426 | |
| 2427 | if (callback !== undefined) { |
| 2428 | validateFunction(callback, 'callback'); |
| 2429 | } |
| 2430 | |
| 2431 | if (this.closed) |
| 2432 | return; |
| 2433 | |
| 2434 | if (callback !== undefined) |
| 2435 | this.once('close', callback); |
| 2436 | |
| 2437 | closeStream(this, code); |
| 2438 | } |
| 2439 | |
| 2440 | // Called by this.destroy(). |
| 2441 | // * Will submit an RST stream to shutdown the stream if necessary. |
nothing calls this directly
no test coverage detected