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

Function TSVConnProtocolEnable

src/api/InkAPI.cc:8329–8340  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8327}
8328
8329TSReturnCode
8330TSVConnProtocolEnable(TSVConn connp, const char *protocol_name)
8331{
8332 TSReturnCode retval = TS_ERROR;
8333 int protocol_idx = globalSessionProtocolNameRegistry.toIndexConst(std::string_view{protocol_name});
8334 auto net_vc = reinterpret_cast<UnixNetVConnection *>(connp);
8335 if (auto alpn = net_vc->get_service<ALPNSupport>(); alpn) {
8336 alpn->enableProtocol(protocol_idx);
8337 retval = TS_SUCCESS;
8338 }
8339 return retval;
8340}
8341
8342TSReturnCode
8343TSVConnProtocolDisable(TSVConn connp, const char *protocol_name)

Callers

nothing calls this directly

Calls 2

toIndexConstMethod · 0.80
enableProtocolMethod · 0.80

Tested by

no test coverage detected