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

Method generate_frame

src/proxy/http3/Http3SettingsFramer.cc:27–61  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

25#include "proxy/http3/Http3Config.h"
26
27Http3FrameUPtr
28Http3SettingsFramer::generate_frame()
29{
30 if (this->_is_sent) {
31 return Http3FrameFactory::create_null_frame();
32 }
33
34 this->_is_sent = true;
35
36 ts::Http3Config::scoped_config params;
37
38 Http3SettingsFrame *frame = http3SettingsFrameAllocator.alloc();
39 new (frame) Http3SettingsFrame();
40
41 if (params->header_table_size() != HTTP3_DEFAULT_HEADER_TABLE_SIZE) {
42 frame->set(Http3SettingsId::HEADER_TABLE_SIZE, params->header_table_size());
43 }
44
45 if (params->max_field_section_size() != HTTP3_DEFAULT_MAX_FIELD_SECTION_SIZE) {
46 frame->set(Http3SettingsId::MAX_FIELD_SECTION_SIZE, params->max_field_section_size());
47 }
48
49 if (params->qpack_blocked_streams() != HTTP3_DEFAULT_QPACK_BLOCKED_STREAMS) {
50 frame->set(Http3SettingsId::QPACK_BLOCKED_STREAMS, params->qpack_blocked_streams());
51 }
52
53 // Server side only
54 if (this->_context == NET_VCONNECTION_IN) {
55 if (params->num_placeholders() != HTTP3_DEFAULT_NUM_PLACEHOLDERS) {
56 frame->set(Http3SettingsId::NUM_PLACEHOLDERS, params->num_placeholders());
57 }
58 }
59
60 return Http3SettingsFrameUPtr(frame, &Http3FrameDeleter::delete_settings_frame);
61}
62
63bool
64Http3SettingsFramer::is_done() const

Callers

nothing calls this directly

Calls 6

header_table_sizeMethod · 0.80
qpack_blocked_streamsMethod · 0.80
num_placeholdersMethod · 0.80
allocMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected