MCPcopy Create free account
hub / github.com/apache/trafficserver / _process_write_vio

Method _process_write_vio

src/proxy/http3/Http3Transaction.cc:598–622  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

596}
597
598int64_t
599Http3Transaction::_process_write_vio()
600{
601 if (this->_info.write_vio->cont == nullptr || this->_info.write_vio->op == VIO::NONE) {
602 return 0;
603 }
604
605 ink_release_assert(this->_thread == this_ethread());
606 SCOPED_MUTEX_LOCK(lock, this->_info.write_vio->mutex, this_ethread());
607
608 size_t nwritten = 0;
609 bool all_done = false;
610 auto error = this->_frame_collector.on_write_ready(this->_info.adapter.stream().id(), *this->_info.write_vio->get_writer(),
611 nwritten, all_done);
612 if (error && error->cls != Http3ErrorClass::UNDEFINED) {
613 Http3TransDebug("Error occured while processing write vio: %hu, %s", error->get_code(), error->msg);
614 return 0;
615 }
616 this->_sent_bytes += nwritten;
617 if (all_done) {
618 this->_info.write_vio->nbytes = this->_sent_bytes;
619 }
620
621 return nwritten;
622}
623
624bool
625Http3Transaction::has_request_body(int64_t content_length, bool /* is_chunked_set ATS_UNUSED */) const

Callers 3

state_stream_openMethod · 0.95
do_io_writeMethod · 0.80
reenableMethod · 0.80

Calls 15

this_ethreadFunction · 0.85
on_write_readyMethod · 0.80
get_writerMethod · 0.80
get_codeMethod · 0.80
get_readerMethod · 0.80
get_current_blockMethod · 0.80
block_read_availMethod · 0.80
ntodoMethod · 0.80
memcmpFunction · 0.50
idMethod · 0.45
startMethod · 0.45

Tested by

no test coverage detected