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)
208 ConT::setSslContext(ctx,
false);
220 ConT::closeConnection();
224 using ConT::operator=;
225 using TcpClientBase::operator=;
Contains a base class for creating TCP client connections.
A class for representing an IP address in an OS independent way.
SSL context meant to be used with TcpConnection and friends.
A base class for creating a TCP client connection.
virtual void closeConnection(void)
Check if the connection has been fully connected.
bool isIdle(void) const
Check if the connection is idle.
A class for creating a TCP client connection.
bool isIdle(void) const
Check if the connection is idle.
~TcpClient(void)
Destructor.
virtual void closeConnection(void) override
Disconnect from the remote peer.
void setSslContext(SslContext &ctx)
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.
Namespace for the asynchronous programming classes.