aboutsummaryrefslogtreecommitdiffstats
path: root/lib/edioutput/Transport.cpp
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2025-03-11 16:35:08 +0100
committerMatthias P. Braendli <matthias.braendli@mpb.li>2025-03-11 16:36:06 +0100
commit6517cc3078eba96ea96e085d033a4b8a96eb7151 (patch)
tree6a8d2aee0cf00cd76263bfdca58da6a934547b40 /lib/edioutput/Transport.cpp
parent84a7a40492b3db9f204f48262481e60a1268f469 (diff)
downloaddabmux-6517cc3078eba96ea96e085d033a4b8a96eb7151.tar.gz
dabmux-6517cc3078eba96ea96e085d033a4b8a96eb7151.tar.bz2
dabmux-6517cc3078eba96ea96e085d033a4b8a96eb7151.zip
Add EDI/TCP number of active connections statistics
Diffstat (limited to 'lib/edioutput/Transport.cpp')
-rw-r--r--lib/edioutput/Transport.cpp16
1 files changed, 15 insertions, 1 deletions
diff --git a/lib/edioutput/Transport.cpp b/lib/edioutput/Transport.cpp
index 4979e93..a5e0bc3 100644
--- a/lib/edioutput/Transport.cpp
+++ b/lib/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) {