aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/edioutput
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/edioutput')
-rw-r--r--contrib/edioutput/Transport.cpp16
-rw-r--r--contrib/edioutput/Transport.h11
2 files changed, 24 insertions, 3 deletions
diff --git a/contrib/edioutput/Transport.cpp b/contrib/edioutput/Transport.cpp
index 4979e93..a5e0bc3 100644
--- a/contrib/edioutput/Transport.cpp
+++ b/contrib/edioutput/Transport.cpp
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2022
+ Copyright (C) 2025
Matthias P. Braendli, matthias.braendli@mpb.li
http://www.opendigitalradio.org
@@ -220,6 +220,20 @@ void Sender::override_pft_sequence(uint16_t pseq)
edi_pft.OverridePSeq(pseq);
}
+std::vector<Sender::stats_t> Sender::get_tcp_server_stats() const
+{
+ std::vector<Sender::stats_t> stats;
+
+ for (auto& el : tcp_dispatchers) {
+ Sender::stats_t s;
+ s.listen_port = el.first->listen_port;
+ s.stats = el.second->get_stats();
+ stats.push_back(s);
+ }
+
+ return stats;
+}
+
void Sender::run()
{
while (m_running) {
diff --git a/contrib/edioutput/Transport.h b/contrib/edioutput/Transport.h
index c62545c..2ca638e 100644
--- a/contrib/edioutput/Transport.h
+++ b/contrib/edioutput/Transport.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2022
+ Copyright (C) 2025
Matthias P. Braendli, matthias.braendli@mpb.li
http://www.opendigitalradio.org
@@ -38,10 +38,11 @@
#include <cstdint>
#include <thread>
#include <mutex>
+#include <vector>
namespace edi {
-/** STI sender for EDI output */
+/** ETI/STI sender for EDI output */
class Sender {
public:
@@ -64,6 +65,12 @@ class Sender {
void override_af_sequence(uint16_t seq);
void override_pft_sequence(uint16_t pseq);
+ struct stats_t {
+ uint16_t listen_port;
+ std::vector<Socket::TCPConnection::stats_t> stats;
+ };
+ std::vector<stats_t> get_tcp_server_stats() const;
+
private:
void run();