38 #ifndef ASYNC_COMM_TCP_CLIENT_H 39 #define ASYNC_COMM_TCP_CLIENT_H 43 #include <boost/asio.hpp> 44 #include <boost/function.hpp> 76 void do_async_read(
const boost::asio::mutable_buffers_1 &buffer,
77 boost::function<
void(
const boost::system::error_code&,
size_t)> handler)
override;
79 boost::function<
void(
const boost::system::error_code&,
size_t)> handler)
override;
90 #endif // ASYNC_COMM_TCP_CLIENT_H
void do_async_read(const boost::asio::mutable_buffers_1 &buffer, boost::function< void(const boost::system::error_code &, size_t)> handler) override
boost::asio::ip::tcp::socket socket_
Abstract base class for an asynchronous communication port.
void do_async_write(const boost::asio::const_buffers_1 &buffer, boost::function< void(const boost::system::error_code &, size_t)> handler) override
static DefaultMessageHandler default_message_handler_
Asynchronous communication class for a TCP client.
TCPClient(std::string host=DEFAULT_HOST, uint16_t port=DEFAULT_PORT, MessageHandler &message_handler=default_message_handler_)
Connect to a TCP socket as a client.
static constexpr uint16_t DEFAULT_PORT
Abstract base class for message handler.
boost::asio::ip::tcp::endpoint endpoint_
static constexpr auto DEFAULT_HOST