From 107dca66a069c5e317d040360b8aafd62c8282db Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Mon, 6 May 2019 17:18:25 +0200 Subject: Implement EDI over TCP --- src/EtiReader.h | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'src/EtiReader.h') diff --git a/src/EtiReader.h b/src/EtiReader.h index 554231e..38f7903 100644 --- a/src/EtiReader.h +++ b/src/EtiReader.h @@ -34,6 +34,7 @@ #include "Eti.h" #include "Log.h" #include "FicSource.h" +#include "Socket.h" #include "SubchannelSource.h" #include "TimestampDecoder.h" #include "lib/edi/ETIDecoder.hpp" @@ -185,13 +186,12 @@ private: }; /* The EDI input does not use the inputs defined in InputReader.h, as they were - * designed for ETI. It uses the EdiUdpInput which in turn uses a threaded + * designed for ETI. It uses the EdiTransport which in turn uses a threaded * receiver. */ - -class EdiUdpInput { +class EdiTransport { public: - EdiUdpInput(EdiDecoder::ETIDecoder& decoder); + EdiTransport(EdiDecoder::ETIDecoder& decoder); void Open(const std::string& uri); @@ -209,7 +209,11 @@ class EdiUdpInput { std::string m_bindto; std::string m_mcastaddr; + enum class Proto { UDP, TCP }; + Proto m_proto; UdpReceiver m_udp_rx; + std::vector m_tcpbuffer; + TCPClient m_tcpclient; EdiDecoder::ETIDecoder& m_decoder; }; #endif -- cgit v1.2.3