20 #ifndef INCLUDE_OLA_NETWORK_TCPCONNECTOR_H_
21 #define INCLUDE_OLA_NETWORK_TCPCONNECTOR_H_
24 #include <ola/Clock.h>
27 #include <ola/io/SelectServerInterface.h>
30 #include <ola/network/TCPSocket.h>
80 TCPConnectCallback *callback);
91 bool Cancel(TCPConnectionID
id);
110 typedef std::set<class PendingTCPConnection*> ConnectionSet;
113 ConnectionSet m_connections;
116 void Timeout(
const ConnectionSet::iterator &iter);
118 void CleanUpOrphans();
124 #endif // INCLUDE_OLA_NETWORK_TCPCONNECTOR_H_
Represents Socket Addresses.
ola::SingleUseCallback2< void, int, int > TCPConnectCallback
The callback run when a TCP connection request completes.
Definition: TCPConnector.h:48
const void * TCPConnectionID
The TCPConnectionID.
Definition: TCPConnector.h:55
bool Cancel(TCPConnectionID id)
Cancel a pending TCP connection.
Definition: TCPConnector.cpp:176
An class which manages non-blocking TCP connects.
Definition: TCPConnector.h:40
The interface for the SelectServer.
Definition: SelectServerInterface.h:42
Represents an IPv4 Address.
void SocketWritable(class PendingTCPConnection *connection)
Called when the TCP socket connects.
Definition: TCPConnector.cpp:212
The namespace containing all OLA symbols.
Definition: Credentials.cpp:44
Definition: TCPConnector.cpp:40
unsigned int ConnectionsPending() const
Return the number of pending connections.
Definition: TCPConnector.h:101
void CancelAll()
Cancel all pending TCP connections.
Definition: TCPConnector.cpp:194
TCPConnector(ola::io::SelectServerInterface *ss)
Create a new TCPConnector.
Definition: TCPConnector.cpp:101
An IPv4 SocketAddress.
Definition: SocketAddress.h:77
TCPConnectionID Connect(const IPV4SocketAddress &endpoint, const ola::TimeInterval &timeout, TCPConnectCallback *callback)
Perform a non-blocking TCP connect.
Definition: TCPConnector.cpp:110
A 2 argument callback which deletes itself after it's run.
Definition: Callback.h:1907