MCPcopy Create free account
hub / github.com/Qv2ray/Qv2ray / StartAPI

Method StartAPI

src/core/kernel/APIBackend.cpp:31–49  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

29 }
30
31 void APIWorker::StartAPI(const QMap<bool, QMap<QString, QString>> &tagProtocolPair)
32 {
33 // Config API
34 tagProtocolConfig.clear();
35 for (const auto &key : tagProtocolPair.keys())
36 {
37 const auto config = key ? DefaultOutboundAPIConfig : DefaultInboundAPIConfig;
38 for (const auto &[tag, protocol] : tagProtocolPair[key].toStdMap())
39 {
40 for (const auto &[type, protocols] : config)
41 {
42 if (protocols.contains(protocol))
43 tagProtocolConfig[tag] = { protocol, type };
44 }
45 }
46 }
47
48 running = true;
49 }
50
51 void APIWorker::StopAPI()
52 {

Callers 1

StartConnectionMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected