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

Method FindProtocolIndex

src/brpc/input_messenger.cpp:525–533  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

523}
524
525int InputMessenger::FindProtocolIndex(const char* name) const {
526 for (size_t i = 0; i < _capacity; ++i) {
527 if (_handlers[i].parse != NULL
528 && strcmp(name, _handlers[i].name) == 0) {
529 return i;
530 }
531 }
532 return -1;
533}
534
535int InputMessenger::FindProtocolIndex(ProtocolType type) const {
536 const Protocol* proto = FindProtocol(type);

Callers 1

InitChannelOptionsMethod · 0.80

Calls 1

FindProtocolFunction · 0.85

Tested by

no test coverage detected