30#ifndef ASYNC_TCP_CLIENT_BASE_INCLUDED
31#define ASYNC_TCP_CLIENT_BASE_INCLUDED
40#include <sigc++/sigc++.h>
147 uint16_t remote_port);
160 uint16_t remote_port);
184 if (!dns.
label().empty())
213 void connect(
const std::string &remote_host, uint16_t remote_port);
313 void dnsResultsReady(
DnsLookup& dns_lookup);
314 void connectToRemote(
void);
315 void connectHandler(
FdWatch *watch);
Contains a class for executing DNS queries.
Contains a watch for file descriptors.
Contains a class for handling exiting TCP connections.
A class for performing asynchronous DNS lookups.
const std::string & label(void) const
Return the associated label.
bool isPending(void) const
Check if a DNS lookup is pending.
A class for watching file descriptors.
A class for representing an IP address in an OS independent way.
std::string toString(void) const
Return the string representation of the IP address.
A base class for creating a TCP client connection.
TcpClientBase(TcpConnection *con, const IpAddress &remote_ip, uint16_t remote_port)
Constructor.
virtual void connectionEstablished(void)
Called when the connection has been established to the server.
virtual void closeConnection(void)
Check if the connection has been fully connected.
virtual ~TcpClientBase(void)
Destructor.
virtual void emitConnected(void)
TcpConnection * conObj(void)
Return the connection object for this client connection.
bool isIdle(void) const
Check if the connection is idle.
virtual TcpClientBase & operator=(TcpClientBase &&other)
Move assignmnt operator.
void connect(const Async::IpAddress &remote_ip, uint16_t remote_port)
Connect to the remote host.
sigc::signal< void > connected
A signal that is emitted when a connection has been established.
std::string remoteHostName(void) const
Get the name of the remote host as given to connect()
const IpAddress & bindIp(void) const
Get the bind IP address.
void connect(const std::string &remote_host, uint16_t remote_port)
Connect to the remote host.
TcpClientBase(TcpConnection *con, const std::string &remote_host, uint16_t remote_port)
Constructor.
TcpClientBase(TcpConnection *con)
Constructor.
void setBindIp(const IpAddress &bind_ip)
Bind to the interface having the specified IP address.
virtual void disconnect(void)=0
Disconnect from the remote host.
void connect(void)
Connect to the remote host.
A class for handling exiting TCP connections.
const IpAddress & remoteHost(void) const
Return the IP-address of the remote host.
Namespace for the asynchronous programming classes.