MCPcopy Create free account
hub / github.com/Codeya-IDE/deepin-ide / main

Function main

src/tools/performancedapter/main.cpp:33–66  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

31};
32
33int main(int argc, char *argv[])
34{
35 QApplication a(argc, argv);
36
37 QCommandLineParser parser;
38
39 parser.addOptions(options);
40 parser.addHelpOption();
41 parser.process(a);
42
43 auto list = parser.optionNames();
44
45 quint16 port = DefaultValues::port.toUShort();
46 if (list.contains(OptionNames::port)) {
47 port = parser.value(OptionNames::port).toUShort();
48 }
49
50 jsonrpc::TcpSocketServer server("127.0.0.1", port);
51 ServerHandler hand(server, new Tools);
52
53 if (hand.StartListening()) {
54 std::cout << "Server started successfully name: "
55 << QCoreApplication::applicationName().toStdString()
56 << "port: " << port
57 << std::endl;
58 } else {
59 std::cout << "Error starting Server name: "
60 << QCoreApplication::applicationName().toStdString()
61 << "port: " << port
62 << std::endl;
63 }
64
65 return a.exec();
66}

Callers

nothing calls this directly

Calls 5

processMethod · 0.45
containsMethod · 0.45
valueMethod · 0.45
StartListeningMethod · 0.45
execMethod · 0.45

Tested by

no test coverage detected