Asynchronous communication class for a TCP client.
More...
#include <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 |
|
void | do_async_write (const boost::asio::const_buffers_1 &buffer, boost::function< void(const boost::system::error_code &, size_t)> handler) override |
|
void | do_close () override |
|
bool | do_init () override |
|
bool | is_open () override |
|
Asynchronous communication class for a TCP client.
Definition at line 55 of file tcp_client.h.
Connect to a TCP socket as a client.
- Parameters
-
host | The host where the TCP server is running |
port | The port on which the TCP server is listening |
Definition at line 47 of file tcp_client.cpp.
async_comm::TCPClient::~TCPClient |
( |
| ) |
|
void async_comm::TCPClient::do_async_read |
( |
const boost::asio::mutable_buffers_1 & |
buffer, |
|
|
boost::function< void(const boost::system::error_code &, size_t)> |
handler |
|
) |
| |
|
overrideprivatevirtual |
void async_comm::TCPClient::do_async_write |
( |
const boost::asio::const_buffers_1 & |
buffer, |
|
|
boost::function< void(const boost::system::error_code &, size_t)> |
handler |
|
) |
| |
|
overrideprivatevirtual |
void async_comm::TCPClient::do_close |
( |
| ) |
|
|
overrideprivatevirtual |
bool async_comm::TCPClient::do_init |
( |
| ) |
|
|
overrideprivatevirtual |
bool async_comm::TCPClient::is_open |
( |
| ) |
|
|
overrideprivatevirtual |
constexpr auto async_comm::TCPClient::DEFAULT_HOST = "localhost" |
|
staticprivate |
constexpr uint16_t async_comm::TCPClient::DEFAULT_PORT = 16140 |
|
staticprivate |
boost::asio::ip::tcp::endpoint async_comm::TCPClient::endpoint_ |
|
private |
std::string async_comm::TCPClient::host_ |
|
private |
uint16_t async_comm::TCPClient::port_ |
|
private |
boost::asio::ip::tcp::socket async_comm::TCPClient::socket_ |
|
private |
The documentation for this class was generated from the following files: