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

Method indexFor

src/records/RecHttp.cc:875–884  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

873}
874
875int
876SessionProtocolNameRegistry::indexFor(TextView name) const
877{
878 const swoc::TextView *end = m_names.begin() + m_n;
879 auto spot = std::find(m_names.begin(), end, name);
880 if (spot != end) {
881 return static_cast<int>(spot - m_names.begin());
882 }
883 return INVALID;
884}
885
886swoc::TextView
887SessionProtocolNameRegistry::nameFor(int idx) const

Callers 5

toIndexMethod · 0.95
toIndexConstMethod · 0.95
load_tunnel_alpnFunction · 0.80

Calls 1

beginMethod · 0.45

Tested by

no test coverage detected