#include "pip.h" #include "picrypt.h" using namespace PICoutManipulators; PIString ip = "0.0.0.0"; int port = 10101; void usage() { piCout << Bold << "PIP Cloud Dispatcher"; piCout << Cyan << "Version" << Bold << PIPVersion() << NewLine; piCout << Green << Bold << "Usage:" << Default << "\"picloud [-h] [-i ] [-p ]\"" << NewLine; piCout << Green << Bold << "Details:"; piCout << "-h --help " << Green << "- display this message and exit"; piCout << "-i --ip " << Green << "- listen address, default \"0.0.0.0\""; piCout << "-p --port " << Green << "- listen port, default 10101"; } int main (int argc, char * argv[]) { PICrypt::hash(""); PICLI cli(argc, argv); cli.addArgument("help"); cli.addArgument("ip", true); cli.addArgument("port", true); if (cli.hasArgument("help")) { usage(); return 0; } if (cli.hasArgument("ip")) ip = cli.argumentValue("ip"); if (cli.hasArgument("port")) port = cli.argumentValue("port").toInt(); return 0; }