MCPcopy Create free account
hub / github.com/apache/brpc / ListProtocols

Function ListProtocols

src/brpc/protocol.cpp:113–121  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

111}
112
113void ListProtocols(std::vector<Protocol>* vec) {
114 vec->clear();
115 ProtocolEntry* const protocol_map = get_protocol_map();
116 for (size_t i = 0; i < MAX_PROTOCOL_SIZE; ++i) {
117 if (protocol_map[i].valid.load(butil::memory_order_acquire)) {
118 vec->push_back(protocol_map[i].protocol);
119 }
120 }
121}
122
123void ListProtocols(std::vector<std::pair<ProtocolType, Protocol> >* vec) {
124 vec->clear();

Callers 5

InitMethod · 0.85
FindProtocolOfHandlerFunction · 0.85
PrintSupportedProtocolsFunction · 0.85
BuildAcceptorMethod · 0.85

Calls 4

get_protocol_mapFunction · 0.85
clearMethod · 0.45
loadMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected