From 6517cc3078eba96ea96e085d033a4b8a96eb7151 Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Tue, 11 Mar 2025 16:35:08 +0100 Subject: Add EDI/TCP number of active connections statistics --- lib/edioutput/Transport.cpp | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'lib/edioutput/Transport.cpp') 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::get_tcp_server_stats() const +{ + std::vector 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) { -- cgit v1.2.3