74 size_t receiveBufferSize = DEFAULT_UDP_BUF_SIZE);
93 size_t receiveBufferSize = DEFAULT_UDP_BUF_SIZE);
108 uint16_t ListenPort()
const;
118 void CreateUdpSocket(
eUdpOption receiveOptions,
size_t receiveBufferSize);
120 void StartAsyncRead();
126 void ReadComplete(
const boost_sys::error_code& error,
size_t bytesReceived);
131 void SetClosing(
bool closing);
136 bool IsClosing()
const;
138 void ProcessCloseSocket();
146 bool m_closing{
false};
148 std::unique_ptr<IoContextThreadGroup> m_ioThreadGroup{};
152 uint16_t m_listenPort{0};
162 boost_udp_t::endpoint m_senderEndpoint{};
171 #endif // UDPRECEIVER A general purpose UDP receiver.
Definition: UdpReceiver.h:49
eUdpOption
The udp options enumeration.
Definition: AsioDefines.h:98
boost_iocontext_t::strand m_strand
I/O context strand.
Definition: UdpReceiver.h:150
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.
std::function< void(const char_buffer_t &)> message_received_handler_t
Typedef to message received handler function object.
Definition: AsioDefines.h:290
Class defining a thread synchronisation event.
Definition: SyncEvent.h:70
The core_lib namespace.
Definition: AsioDefines.h:59
boost_udp_t::socket m_socket
UDP socket.
Definition: UdpReceiver.h:164
boost_asio::io_context boost_iocontext_t
Boost IO context convenience typedef.
Definition: AsioDefines.h:46
std::mutex m_closingMutex
Mutex to protect shutdown of receiver.
Definition: UdpReceiver.h:142
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