20 #ifndef INCLUDE_OLA_NETWORK_TCPCONNECTOR_H_
21 #define INCLUDE_OLA_NETWORK_TCPCONNECTOR_H_
24 #include <ola/Clock.h>
26 #include <ola/io/Descriptor.h>
27 #include <ola/io/SelectServerInterface.h>
30 #include <ola/network/TCPSocket.h>
114 ola::io::DescriptorHandle WriteDescriptor()
const {
return m_handle; }
121 ola::thread::timeout_id timeout_id;
125 ola::io::DescriptorHandle m_handle;
128 typedef std::set<PendingTCPConnection*> ConnectionSet;
129 typedef std::vector<PendingTCPConnection*> ConnectionList;
132 ConnectionSet m_connections;
133 ConnectionList m_orphaned_connections;
135 void SocketWritable(PendingTCPConnection *connection);
136 void FreePendingConnection(PendingTCPConnection *connection);
137 void Timeout(
const ConnectionSet::iterator &iter);
138 void TimeoutEvent(PendingTCPConnection *connection);
139 void CleanUpOrphans();
145 #endif // INCLUDE_OLA_NETWORK_TCPCONNECTOR_H_