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

Method generate_frame

src/proxy/http3/Http3HeaderFramer.cc:53–81  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

51}
52
53Http3FrameUPtr
54Http3HeaderFramer::generate_frame()
55{
56 if (!this->_source_vio->get_reader()) {
57 return Http3FrameFactory::create_null_frame();
58 }
59
60 ink_assert(!this->_transaction->is_response_header_sent());
61
62 if (!this->_header_block) {
63 // this->_header_block will be filled if it is ready
64 this->_generate_header_block();
65 }
66
67 if (this->_header_block) {
68 uint64_t len = std::min(this->_header_block_len - this->_header_block_wrote, UINT64_C(64 * 1024));
69
70 Http3FrameUPtr frame = Http3FrameFactory::create_headers_frame(this->_header_block_reader, len);
71
72 this->_header_block_wrote += len;
73
74 if (this->_header_block_len == this->_header_block_wrote) {
75 this->_sent_all_data = true;
76 }
77 return frame;
78 } else {
79 return Http3FrameFactory::create_null_frame();
80 }
81}
82
83bool
84Http3HeaderFramer::is_done() const

Callers

nothing calls this directly

Calls 3

get_readerMethod · 0.80

Tested by

no test coverage detected