21 #ifndef INCLUDE_OLA_IO_SELECTSERVER_H_
22 #define INCLUDE_OLA_IO_SELECTSERVER_H_
25 #include <ola/Clock.h>
28 #include <ola/io/SelectServerInterface.h>
29 #include <ola/network/Socket.h>
30 #include <ola/thread/Thread.h>
36 class SelectServerTest;
124 bool delete_on_close =
false);
161 typedef std::set<ola::Callback0<void>*> LoopClosureSet;
164 bool m_terminate, m_is_running;
166 std::auto_ptr<class TimeoutManager> m_timeout_manager;
167 std::auto_ptr<class PollerInterface> m_poller;
171 LoopClosureSet m_loop_callbacks;
172 std::queue<ola::BaseCallback0<void>*> m_incoming_queue;
177 void DrainAndExecute();
178 void SetTerminate() { m_terminate =
true; }
181 static const unsigned int POLL_INTERVAL_SECOND = 10;
182 static const unsigned int POLL_INTERVAL_USECOND = 0;
186 friend class ::SelectServerTest;
192 #endif // INCLUDE_OLA_IO_SELECTSERVER_H_