diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/input/Edi.cpp | 7 | 
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();  | 
