| 333 | } |
| 334 | |
| 335 | void |
| 336 | Http3App::_handle_uni_stream_on_write_ready(int /* event */, VIO *vio) |
| 337 | { |
| 338 | QUICStreamVCAdapter *adapter = static_cast<QUICStreamVCAdapter *>(vio->vc_server); |
| 339 | |
| 340 | auto it = this->_local_uni_stream_map.find(adapter->stream().id()); |
| 341 | if (it == this->_local_uni_stream_map.end()) { |
| 342 | ink_abort("stream not found"); |
| 343 | return; |
| 344 | } |
| 345 | |
| 346 | switch (it->second) { |
| 347 | case Http3StreamType::CONTROL: |
| 348 | if (!this->_is_control_stream_initialized) { |
| 349 | uint8_t buf[] = {static_cast<uint8_t>(it->second)}; |
| 350 | vio->get_writer()->write(buf, sizeof(uint8_t)); |
| 351 | this->_is_control_stream_initialized = true; |
| 352 | } else { |
| 353 | size_t nwritten = 0; |
| 354 | bool all_done = false; |
| 355 | this->_control_stream_collector.on_write_ready(adapter->stream().id(), *vio->get_writer(), nwritten, all_done); |
| 356 | vio->nbytes += nwritten; |
| 357 | if (all_done) { |
| 358 | vio->done(); |
| 359 | } |
| 360 | } |
| 361 | break; |
| 362 | case Http3StreamType::QPACK_ENCODER: |
| 363 | case Http3StreamType::QPACK_DECODER: { |
| 364 | this->_set_qpack_stream(it->second, adapter); |
| 365 | } |
| 366 | case Http3StreamType::UNKNOWN: |
| 367 | case Http3StreamType::PUSH: |
| 368 | default: |
| 369 | break; |
| 370 | } |
| 371 | } |
| 372 | |
| 373 | void |
| 374 | Http3App::_handle_uni_stream_on_write_complete(int event, VIO *vio) |
no test coverage detected