38 #ifndef ASYNC_COMM_UDP_H 39 #define ASYNC_COMM_UDP_H 43 #include <boost/asio.hpp> 44 #include <boost/function.hpp> 81 void do_async_read(
const boost::asio::mutable_buffers_1 &buffer,
82 boost::function<
void(
const boost::system::error_code&,
size_t)> handler)
override;
84 boost::function<
void(
const boost::system::error_code&,
size_t)> handler)
override;
99 #endif // ASYNC_COMM_UDP_H boost::asio::ip::udp::endpoint bind_endpoint_
static constexpr uint16_t DEFAULT_REMOTE_PORT
UDP(std::string bind_host=DEFAULT_BIND_HOST, uint16_t bind_port=DEFAULT_BIND_PORT, std::string remote_host=DEFAULT_REMOTE_HOST, uint16_t remote_port=DEFAULT_REMOTE_PORT, MessageHandler &message_handler=default_message_handler_)
Bind a UDP socket.
boost::asio::ip::udp::socket socket_
static constexpr auto DEFAULT_REMOTE_HOST
static constexpr uint16_t DEFAULT_BIND_PORT
Abstract base class for an asynchronous communication port.
boost::asio::ip::udp::endpoint remote_endpoint_
static DefaultMessageHandler default_message_handler_
static constexpr auto DEFAULT_BIND_HOST
Abstract base class for message handler.
Asynchronous communication class for a UDP socket.
void do_async_read(const boost::asio::mutable_buffers_1 &buffer, boost::function< void(const boost::system::error_code &, size_t)> handler) override
void do_async_write(const boost::asio::const_buffers_1 &buffer, boost::function< void(const boost::system::error_code &, size_t)> handler) override