aboutsummaryrefslogtreecommitdiffstats
path: root/src/EtiReader.h
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2019-05-06 17:18:25 +0200
committerMatthias P. Braendli <matthias.braendli@mpb.li>2019-05-06 17:18:25 +0200
commit107dca66a069c5e317d040360b8aafd62c8282db (patch)
tree534e9e4860327b8b49170f103b9f7419832c1928 /src/EtiReader.h
parent473232ab177a4811115ff5713bb25893448dafd7 (diff)
downloaddabmod-107dca66a069c5e317d040360b8aafd62c8282db.tar.gz
dabmod-107dca66a069c5e317d040360b8aafd62c8282db.tar.bz2
dabmod-107dca66a069c5e317d040360b8aafd62c8282db.zip
Implement EDI over TCP
Diffstat (limited to 'src/EtiReader.h')
-rw-r--r--src/EtiReader.h12
1 files changed, 8 insertions, 4 deletions
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<uint8_t> m_tcpbuffer;
+ TCPClient m_tcpclient;
EdiDecoder::ETIDecoder& m_decoder;
};
#endif