From fdff20e96d7198124542e6d03c27e1d496c4b328 Mon Sep 17 00:00:00 2001 From: Sergiy G Date: Wed, 31 Jan 2018 10:41:34 +0200 Subject: Enabled multicast support. Fix missing header in PAPRStats --- lib/UdpSocket.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'lib/UdpSocket.h') diff --git a/lib/UdpSocket.h b/lib/UdpSocket.h index 8c968d2..8c71b9d 100644 --- a/lib/UdpSocket.h +++ b/lib/UdpSocket.h @@ -111,7 +111,7 @@ class UdpSocket */ int receive(UdpPacket& packet); - int joinGroup(char* groupname); + int joinGroup(const char* groupname, const char *if_addr); int setMulticastSource(const char* source_addr); int setMulticastTTL(int ttl); @@ -184,7 +184,7 @@ class UdpReceiver { UdpReceiver operator=(const UdpReceiver&) = delete; // Start the receiver in a separate thread - void start(int port, size_t max_packets_queued); + void start(int port, std::string& bindto, std::string& mcastaddr, size_t max_packets_queued); // Get the data contained in a UDP packet, blocks if none available // In case of error, throws a runtime_error @@ -194,6 +194,8 @@ class UdpReceiver { void m_run(void); int m_port; + std::string m_bindto; + std::string m_mcastaddr; size_t m_max_packets_queued; std::thread m_thread; std::atomic m_stop; -- cgit v1.2.3