From 98a94a9fd92cdfb254823fdce2157d66247b59c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Reis?= Date: Sat, 15 Nov 2014 04:58:44 +0000 Subject: [PATCH] Accepting address in command line, for debugging --- src/capture_comm.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/capture_comm.cpp b/src/capture_comm.cpp index 1bd4688..8bd4a83 100644 --- a/src/capture_comm.cpp +++ b/src/capture_comm.cpp @@ -37,8 +37,6 @@ const string CRYPTO_CIPHER = "aes-128-cbc"; class DumpComm { - string host_; - unsigned short port_; PublicChannel<> public_channel_; mutex private_channel_mutex_; shared_ptr> private_channel_; @@ -149,8 +147,6 @@ class DumpComm public: DumpComm (string const& host, unsigned short port) : - host_ (host), - port_ (port), public_channel_ (host, port), private_channel_mutex_(), private_channel_() @@ -199,6 +195,10 @@ int main (int argc, char** argv) { - DumpComm comm ("10.255.255.255", 6666); + string host = "10.255.255.255"; + if (argc > 1) { + host = argv[1]; + } + DumpComm comm (host, 6666); comm.run(); }