| 1437 | } |
| 1438 | |
| 1439 | int |
| 1440 | QPACK::_write_header_acknowledgement(uint64_t stream_id) |
| 1441 | { |
| 1442 | IOBufferBlock *instruction = new_IOBufferBlock(); |
| 1443 | instruction->alloc(TS_IOBUFFER_SIZE_INDEX_128); |
| 1444 | |
| 1445 | char *buf = instruction->end(); |
| 1446 | char *buf_end = buf + instruction->write_avail(); |
| 1447 | int written = 0; |
| 1448 | |
| 1449 | // Header Acknowledgement |
| 1450 | buf[0] = 0x80; |
| 1451 | |
| 1452 | // Stream ID |
| 1453 | int ret; |
| 1454 | if ((ret = xpack_encode_integer(reinterpret_cast<uint8_t *>(buf + written), reinterpret_cast<uint8_t *>(buf_end), stream_id, 7)) < |
| 1455 | 0) { |
| 1456 | return ret; |
| 1457 | } |
| 1458 | written += ret; |
| 1459 | |
| 1460 | // Finalize and Schedule to send |
| 1461 | instruction->fill(written); |
| 1462 | this->_encoder_stream_sending_instructions->append_block(instruction); |
| 1463 | |
| 1464 | return 0; |
| 1465 | } |
| 1466 | |
| 1467 | int |
| 1468 | QPACK::_write_stream_cancellation(uint64_t stream_id) |
no test coverage detected