20 #ifndef INCLUDE_OLA_NETWORK_ADVANCEDTCPCONNECTOR_H_
21 #define INCLUDE_OLA_NETWORK_ADVANCEDTCPCONNECTOR_H_
27 #include <ola/io/SelectServerInterface.h>
28 #include <ola/network/TCPConnector.h>
29 #include <ola/network/TCPSocketFactory.h>
30 #include <ola/util/Backoff.h>
108 unsigned int *failed_attempts)
const;
126 unsigned int failed_attempts;
133 typedef std::pair<IPV4Address, uint16_t> IPPortPair;
134 typedef std::map<IPPortPair, ConnectionInfo*> ConnectionMap;
136 TCPSocketFactoryInterface *m_socket_factory;
138 TCPConnector m_connector;
140 ConnectionMap m_connections;
142 void ScheduleRetry(
const IPPortPair &key, ConnectionInfo *info);
143 void RetryTimeout(IPPortPair key);
144 void ConnectionResult(IPPortPair key,
int fd,
int error);
145 void AttemptConnection(
const IPPortPair &key, ConnectionInfo *state);
146 void AbortConnection(ConnectionInfo *state);
152 #endif // INCLUDE_OLA_NETWORK_ADVANCEDTCPCONNECTOR_H_