picloud start develop

This commit is contained in:
2020-06-15 11:09:34 +03:00
parent f662a92380
commit 3f7f67e198
7 changed files with 133 additions and 7 deletions

View File

@@ -19,12 +19,12 @@
#include "pip.h"
#include "picrypt.h"
#include "dispatcherserver.h"
using namespace PICoutManipulators;
PIString ip = "0.0.0.0";
int port = 10101;
PIEthernet::Address addr = PIEthernet::Address("0.0.0.0", 10101);
void usage() {
piCout << Bold << "PIP Cloud Dispatcher";
@@ -49,10 +49,11 @@ int main (int argc, char * argv[]) {
return 0;
}
if (cli.hasArgument("ip"))
ip = cli.argumentValue("ip");
addr.setIP(cli.argumentValue("ip"));
if (cli.hasArgument("port"))
port = cli.argumentValue("port").toInt();
addr.setPort(cli.argumentValue("port").toInt());
DispatcherServer server(addr);
WAIT_FOR_EXIT
return 0;
}