tools/hexnet: Don’t confuse users

Soda
BodgeMaster 2022-10-22 00:57:10 +02:00
parent 89cfb9d850
commit 5574cdb4bf
1 changed files with 3 additions and 2 deletions

View File

@ -33,6 +33,7 @@
#define EXIT_RUNTIME 1
#define EXIT_USAGE 2
#define EXIT_UNIMPLEMENTED 3
#define EXIT_SIGNAL 4
// TCP v4 server
sockpp::tcp_socket tcpSocket;
@ -62,7 +63,7 @@ void signalHandler(int signal) {
}
std::cerr << "Received signal " << signal << ", bye!" << std::endl;
std::exit(signal);
std::exit(EXIT_SIGNAL);
}
void readFromTCPSocket() {
@ -137,7 +138,7 @@ int main(int argc, char* argv[]) {
}
if (!(ipv4 || ipv6) || (ipv4 && ipv6) || !(tcp || udp) || (tcp && udp)) {
std::cout << cliParser.getUsage() << std::endl;
std::cout << "Please specify which protocols to use (one of IPv4/IPv6, one of TCP/UDP)." << std::endl;
return EXIT_USAGE;
}