38 #ifndef ASYNC_COMM_TCP_CLIENT_H 39 #define ASYNC_COMM_TCP_CLIENT_H 43 #include <boost/asio.hpp> 44 #include <boost/function.hpp> 73 void do_async_read(
const boost::asio::mutable_buffers_1 &buffer,
74 boost::function<
void(
const boost::system::error_code&,
size_t)> handler)
override;
76 boost::function<
void(
const boost::system::error_code&,
size_t)> handler)
override;
87 #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
Asynchronous communication class for a TCP client.
static constexpr uint16_t DEFAULT_PORT
TCPClient(std::string host=DEFAULT_HOST, uint16_t port=DEFAULT_PORT)
Connect to a TCP socket as a client.
boost::asio::ip::tcp::endpoint endpoint_
static constexpr auto DEFAULT_HOST