24 #include <boost/asio.hpp>
25 #include <boost/system/error_code.hpp>
38 void Start(boost::asio::ip::udp::endpoint& endpoint);
54 void HandleRead(
const boost::system::error_code& e, std::size_t bytes_transferred);
57 boost::array<char, CGlobalConfiguration::MAX_PACKET_SIZE>
m_buffer;
static CECNHandler & Instance()
Definition: CECNHandler.cpp:66
CECNHandler()
Private constructor for the singleton instance.
Definition: CECNHandler.cpp:56
boost::asio::ip::udp::endpoint m_recv_from
Endpoint for incoming message.
Definition: CECNHandler.hpp:63
boost::asio::ip::udp::socket & GetSocket()
Gets the listener socket.
Definition: CECNHandler.hpp:44
void ScheduleListen()
Definition: CECNHandler.cpp:186
void Start(boost::asio::ip::udp::endpoint &endpoint)
Bind the listener to the specified endpoint and listen for datagrams.
Definition: CECNHandler.cpp:80
boost::array< char, CGlobalConfiguration::MAX_PACKET_SIZE > m_buffer
Buffer for incoming data.
Definition: CECNHandler.hpp:57
Definition: CECNHandler.hpp:32
boost::asio::ip::udp::socket m_socket
Socket for the CConnection.
Definition: CECNHandler.hpp:60
void Stop()
Stop any current async read and close the socket.
Definition: CECNHandler.cpp:100
void HandleRead(const boost::system::error_code &e, std::size_t bytes_transferred)
Handle completion of a read operation.
Definition: CECNHandler.cpp:124