From c4ca7f8b4492242f9497a478089af1dd43a522b1 Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Mon, 22 Aug 2022 17:16:30 +0200 Subject: Common 306b5fc: Move tcp_server_preroll setting to tcp_server_t --- lib/edioutput/EDIConfig.h | 6 +++--- lib/edioutput/Transport.cpp | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'lib') diff --git a/lib/edioutput/EDIConfig.h b/lib/edioutput/EDIConfig.h index a7225a7..1997210 100644 --- a/lib/edioutput/EDIConfig.h +++ b/lib/edioutput/EDIConfig.h @@ -53,6 +53,9 @@ struct udp_destination_t : public destination_t { struct tcp_server_t : public destination_t { unsigned int listen_port = 0; size_t max_frames_queued = 1024; + + // The TCP Server output can preroll a fixed number of previous buffers each time a new client connects. + size_t tcp_server_preroll_buffers = 0; }; // TCP client that connects to one endpoint @@ -74,9 +77,6 @@ struct configuration_t { // Spread transmission of fragments in time. 1.0 = 100% means spreading over the whole duration of a frame (24ms) // Above 100% means that the fragments are spread over several 24ms periods, interleaving the AF packets. - // TCP Server output can preroll a fixed number of previous buffers each time a new client connects. - size_t tcp_server_preroll_buffers = 0; - bool enabled() const { return destinations.size() > 0; } void print() const; diff --git a/lib/edioutput/Transport.cpp b/lib/edioutput/Transport.cpp index a870aa0..8ebb9fc 100644 --- a/lib/edioutput/Transport.cpp +++ b/lib/edioutput/Transport.cpp @@ -66,7 +66,7 @@ Sender::Sender(const configuration_t& conf) : edi_pft(m_conf) { if (m_conf.verbose) { - etiLog.level(info) << "Setup EDI Output, TCP output preroll " << m_conf.tcp_server_preroll_buffers; + etiLog.level(info) << "Setup EDI Output"; } for (const auto& edi_dest : m_conf.destinations) { @@ -82,7 +82,7 @@ Sender::Sender(const configuration_t& conf) : } else if (auto tcp_dest = dynamic_pointer_cast(edi_dest)) { auto dispatcher = make_shared( - tcp_dest->max_frames_queued, m_conf.tcp_server_preroll_buffers); + tcp_dest->max_frames_queued, tcp_dest->tcp_server_preroll_buffers); dispatcher->start(tcp_dest->listen_port, "0.0.0.0"); tcp_dispatchers.emplace(tcp_dest.get(), dispatcher); -- cgit v1.2.3