36#ifndef ASYNC_TCP_CLIENT_INCLUDED
37#define ASYNC_TCP_CLIENT_INCLUDED
46#include <sigc++/sigc++.h>
130template <
typename ConT=TcpConnection>
144 explicit TcpClient(
size_t recv_buf_len = ConT::DEFAULT_RECV_BUF_LEN)
159 TcpClient(
const std::string& remote_host, uint16_t remote_port,
160 size_t recv_buf_len = ConT::DEFAULT_RECV_BUF_LEN)
161 : ConT(recv_buf_len),
TcpClientBase(this, remote_host, remote_port)
176 size_t recv_buf_len = ConT::DEFAULT_RECV_BUF_LEN)
177 : ConT(recv_buf_len),
TcpClientBase(this, remote_ip, remote_port)
215 ConT::closeConnection();
219 using ConT::operator=;
220 using TcpClientBase::operator=;
Contains a base class for creating TCP client connections.
A class for performing asynchronous DNS lookups.
A class for watching file descriptors.
A class for representing an IP address in an OS independent way.
virtual void closeConnection(void)
Disconnect from the remote peer.
bool isIdle(void) const
Check if the connection is idle.
bool isIdle(void) const
Check if the connection is idle.
~TcpClient(void)
Destructor.
virtual void closeConnection(void) override
Disconnect from the remote peer.
TcpClient(const IpAddress &remote_ip, uint16_t remote_port, size_t recv_buf_len=ConT::DEFAULT_RECV_BUF_LEN)
Constructor.
virtual void disconnect(void) override
Disconnect from the remote host.
TcpClient(size_t recv_buf_len=ConT::DEFAULT_RECV_BUF_LEN)
Constructor.
TcpClient(const std::string &remote_host, uint16_t remote_port, size_t recv_buf_len=ConT::DEFAULT_RECV_BUF_LEN)
Constructor.
friend class TcpClientBase
Namespace for the asynchronous programming classes.