aboutsummaryrefslogtreecommitdiffstats
path: root/src/input/Edi.cpp
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2025-09-10 09:29:08 +0200
committerMatthias P. Braendli <matthias.braendli@mpb.li>2025-09-10 09:29:08 +0200
commitd30cf3e7c31f9299062b9ef85a0949e60611509f (patch)
tree5240c7127791c2226212722c02d95ea21652a943 /src/input/Edi.cpp
parent91531ce72ea4d90ea541f072da54bc46ef555db8 (diff)
parentb59516179a3e1842de95f8aef549a75dac1102c6 (diff)
downloaddabmux-d30cf3e7c31f9299062b9ef85a0949e60611509f.tar.gz
dabmux-d30cf3e7c31f9299062b9ef85a0949e60611509f.tar.bz2
dabmux-d30cf3e7c31f9299062b9ef85a0949e60611509f.zip
Merge commit 'b595161' into HEAD
Diffstat (limited to 'src/input/Edi.cpp')
-rw-r--r--src/input/Edi.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/input/Edi.cpp b/src/input/Edi.cpp
index 141641f..b100f32 100644
--- a/src/input/Edi.cpp
+++ b/src/input/Edi.cpp
@@ -80,6 +80,7 @@ Edi::~Edi() {
void Edi::open(const std::string& name)
{
const std::regex re_udp("udp://:([0-9]+)");
+ const std::regex re_udp_bindto("udp://([^:]+):([0-9]+)");
const std::regex re_udp_multicast("udp://@([0-9.]+):([0-9]+)");
const std::regex re_udp_multicast_bindto("udp://([0-9.])+@([0-9.]+):([0-9]+)");
const std::regex re_tcp("tcp://(.*):([0-9]+)");
@@ -98,6 +99,12 @@ void Edi::open(const std::string& name)
m_udp_sock.reinit(udp_port);
m_udp_sock.setBlocking(false);
}
+ else if (std::regex_match(name, m, re_udp_bindto)) {
+ const int udp_port = std::stoi(m[2].str());
+ m_input_used = InputUsed::UDP;
+ m_udp_sock.reinit(udp_port, m[1].str());
+ m_udp_sock.setBlocking(false);
+ }
else if (std::regex_match(name, m, re_udp_multicast_bindto)) {
const string bind_to = m[1].str();
const string multicast_address = m[2].str();