class Appl: changed command from required to not-required.

This commit is contained in:
Roland Jax
2014-11-24 18:19:10 +01:00
parent 972277d68d
commit 73eeef99f6
4 changed files with 31 additions and 35 deletions
+7 -6
View File
@@ -22,13 +22,9 @@
#endif
#include "appl.h"
#include "port.h"
#include "decode.h"
#include "tcpsocket.h"
#include <iostream>
#include <fstream>
#include <iomanip>
#include <unistd.h>
#include <cstdlib>
using namespace std;
@@ -58,6 +54,11 @@ int main(int argc, char* argv[])
// parse arguments
A.parseArgs(argc, argv);
if (A.missingCommand() == true) {
cout << "interactive mode started." << endl;
exit(EXIT_FAILURE);
}
TCPClient* client = new TCPClient();
TCPSocket* socket = client->connect(A.getOptVal<const char*>("server"), A.getOptVal<int>("port"));
@@ -87,6 +88,6 @@ int main(int argc, char* argv[])
delete client;
return 0;
exit(EXIT_SUCCESS);
}