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