diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2018-03-06 09:31:43 +0100 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2018-03-06 09:31:43 +0100 |
commit | 0bdd2960707a8abb5d9e435d1313aec4cf264ab1 (patch) | |
tree | 3a79d0364a9c98a5c51f6d837c27a6a94b16247b /src/InputReader.h | |
parent | 0caa62dd6639ac3c3c8e62228f806240295d4ba7 (diff) | |
download | dabmod-0bdd2960707a8abb5d9e435d1313aec4cf264ab1.tar.gz dabmod-0bdd2960707a8abb5d9e435d1313aec4cf264ab1.tar.bz2 dabmod-0bdd2960707a8abb5d9e435d1313aec4cf264ab1.zip |
Implement TCP input auto-reconnect
Diffstat (limited to 'src/InputReader.h')
-rw-r--r-- | src/InputReader.h | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/InputReader.h b/src/InputReader.h index 5b9e80a..84f6835 100644 --- a/src/InputReader.h +++ b/src/InputReader.h @@ -40,6 +40,7 @@ # include "ThreadsafeQueue.h" #endif #include "Log.h" +#include "Socket.h" #include <unistd.h> #define INVALID_SOCKET -1 @@ -129,11 +130,6 @@ class InputFileReader : public InputReader class InputTcpReader : public InputReader { public: - InputTcpReader(); - InputTcpReader(const InputTcpReader& other) = delete; - InputTcpReader& operator=(const InputTcpReader& other) = delete; - virtual ~InputTcpReader(); - // Endpoint is either host:port or tcp://host:port void Open(const std::string& endpoint); @@ -146,7 +142,7 @@ class InputTcpReader : public InputReader virtual void PrintInfo() const; private: - int m_sock = INVALID_SOCKET; + TCPClient m_tcpclient; std::string m_uri; }; |