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

Method xmit

src/proxy/http2/Http2CommonSession.cc:158–179  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

156}
157
158int64_t
159Http2CommonSession::xmit(const Http2TxFrame &frame, bool flush)
160{
161 int64_t len = frame.write_to(this->write_buffer);
162 this->_pending_sending_data_size += len;
163 if (!flush) {
164 // Flush if we already use half of the buffer to avoid adding a new block to the chain.
165 // A frame size can be 16MB at maximum so blocks can be added, but that's fine.
166 if (this->_pending_sending_data_size >= this->_write_size_threshold) {
167 flush = true;
168 } else {
169 // Observe that schedule_transmit will only schedule the first time we
170 // don't flush because the threshold is not met.
171 this->connection_state.schedule_retransmit(HRTIME_MSECONDS(Http2::write_time_threshold));
172 }
173 }
174 if (flush) {
175 this->flush();
176 }
177
178 return len;
179}
180
181void
182Http2CommonSession::flush()

Callers 9

rcv_settings_frameMethod · 0.80
send_a_data_frameMethod · 0.80
send_headers_frameMethod · 0.80
send_rst_stream_frameMethod · 0.80
send_settings_frameMethod · 0.80
send_ping_frameMethod · 0.80
send_goaway_frameMethod · 0.80

Calls 3

flushMethod · 0.95
write_toMethod · 0.80
schedule_retransmitMethod · 0.80

Tested by

no test coverage detected