From 5cb1a52ec43b135831571c8cacc8c84a61ea91b2 Mon Sep 17 00:00:00 2001 From: BodgeMaster <> Date: Wed, 13 Jul 2022 20:30:27 +0200 Subject: [PATCH] tools/hexnet: replace "server" with "listen" because that's what netcat calls it and the argument we use is -l like netcat's listen mode --- src/tools/hexnet.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/tools/hexnet.cpp b/src/tools/hexnet.cpp index 751e26d..3de4fd1 100644 --- a/src/tools/hexnet.cpp +++ b/src/tools/hexnet.cpp @@ -32,7 +32,7 @@ int main(int argc, char* argv[]){ bool ipv6 = true; bool tcp = true; bool udp = true; - bool server = false; + bool listen = false; std::string host = ""; uint16_t port; if (argc<2) { @@ -62,7 +62,7 @@ int main(int argc, char* argv[]){ continue; } if (argument=="-l") { - server = true; + listen = true; continue; } if (argument=="-h") { @@ -73,11 +73,11 @@ int main(int argc, char* argv[]){ usage; return EXIT_SUCCESS; } - if (!server && i==argc-2) { + if (!listen && i==argc-2) { host = argument; } if (i==argc-1) { - if (!server && host=="") { + if (!listen && host=="") { std::cerr << "Not running in listen mode and no host specified." << std::endl; return EXIT_USAGE; } @@ -139,7 +139,7 @@ int main(int argc, char* argv[]){ } // Argument parsing end ############################################ - if (!server) { + if (!listen) { //TODO: verify that host is possibly a valid host (or usage error) //TODO: look up host if necessary, determine IPv4 or IPv6 mode if necessary std::cerr << "Client mode not implemented" << std::endl;