diff options
author | Sergiy G <piratfm@gmail.com> | 2018-01-31 10:41:34 +0200 |
---|---|---|
committer | Sergiy G <piratfm@gmail.com> | 2018-01-31 10:41:34 +0200 |
commit | fdff20e96d7198124542e6d03c27e1d496c4b328 (patch) | |
tree | 2601755f48c737ecfee23cfc6b9e98d6f391de24 /lib/UdpSocket.h | |
parent | 16b0a22c889b27093cb703dfbfacb4af721999cd (diff) | |
download | dabmod-fdff20e96d7198124542e6d03c27e1d496c4b328.tar.gz dabmod-fdff20e96d7198124542e6d03c27e1d496c4b328.tar.bz2 dabmod-fdff20e96d7198124542e6d03c27e1d496c4b328.zip |
Enabled multicast support. Fix missing header in PAPRStats
Diffstat (limited to 'lib/UdpSocket.h')
-rw-r--r-- | lib/UdpSocket.h | 6 |
1 files changed, 4 insertions, 2 deletions
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<bool> m_stop; |