24 #include <QCoreApplication>
25 #include <tclap/CmdLine.h>
26 #include <tclap/ValueArg.h>
30 int ParexServerMode::operator()(
int argc,
char** argv)
32 QCoreApplication app(argc,argv);
34 TCLAP::CmdLine cmdLine(
"SimPT Parex Server");
35 TCLAP::ValueArg<int> nodesArg(
36 "n",
"nodes",
"The minimum number of nodes that a server needs to connect with.",
37 false, 0,
"MIN_NODES", cmdLine);
38 TCLAP::ValueArg<int> portArg(
39 "p",
"port",
"The port used by clients to connect to.",
false, 8888,
"PORT", cmdLine);
40 cmdLine.parse(argc, argv);
42 const int min_nodes = nodesArg.getValue();
43 const int port_number = portArg.getValue();
Namespace for startup modes for simPT tools.
Interface/Implementation for the exec modes.
Server class accepting TCP connections and setting up the server structures.