()
| 198 | }) |
| 199 | |
| 200 | function pressure () { |
| 201 | if (!buf || !resp || !client) return |
| 202 | |
| 203 | assert.ok(!drained) |
| 204 | |
| 205 | while (resp.write(buf) !== false) { |
| 206 | resp.flush() |
| 207 | } |
| 208 | |
| 209 | resp.on('drain', function () { |
| 210 | assert.ok(resp.write('end')) |
| 211 | resp.end() |
| 212 | }) |
| 213 | |
| 214 | resp.on('finish', cb) |
| 215 | client.resume() |
| 216 | } |
| 217 | |
| 218 | request(server) |
| 219 | .get('/') |