27 #ifndef MULTICASTRECEIVER 28 #define MULTICASTRECEIVER 74 const std::string& interfaceAddress =
"",
75 size_t receiveBufferSize = DEFAULT_UDP_BUF_SIZE);
95 const std::string& interfaceAddress =
"",
96 size_t receiveBufferSize = DEFAULT_UDP_BUF_SIZE);
116 std::string InterfaceAddress()
const;
125 void CreateMulticastSocket(
size_t receiveBufferSize);
127 void StartAsyncRead();
133 void ReadComplete(
const boost_sys::error_code& error,
size_t bytesReceived);
138 void SetClosing(
bool closing);
143 bool IsClosing()
const;
145 void ProcessCloseSocket();
149 mutable std::mutex m_closingMutex{};
153 bool m_closing{
false};
155 std::unique_ptr<IoContextThreadGroup> m_ioThreadGroup{};
161 std::string m_interfaceAddress{};
171 boost_udp_t::endpoint m_senderEndpoint{};
180 #endif // MULTICASTRECEIVER std::function< size_t(const char_buffer_t &)> check_bytes_left_to_read_t
Typedef to bytes left to reading checking utility function object.
Definition: AsioDefines.h:288
File containing declarations relating the IoContextThreadGroup class.
boost_udp_t::socket m_socket
The multicast socket.
Definition: MulticastReceiver.h:173
std::function< void(const char_buffer_t &)> message_received_handler_t
Typedef to message received handler function object.
Definition: AsioDefines.h:290
boost_iocontext_t::strand m_strand
I/O context strand.
Definition: MulticastReceiver.h:157
Class defining a thread synchronisation event.
Definition: SyncEvent.h:70
The core_lib namespace.
Definition: AsioDefines.h:59
A general purpose multicast receiver.
Definition: MulticastReceiver.h:49
std::pair< std::string, uint16_t > connection_t
Typedef describing a network connection as (address, port).
Definition: AsioDefines.h:152
boost_asio::io_context boost_iocontext_t
Boost IO context convenience typedef.
Definition: AsioDefines.h:46
File containing declaration of SyncEvent class.
std::vector< char > char_buffer_t
Typedef to generic char buffer based on s std::vector<char>.
Definition: AsioDefines.h:239