+#include <iostream>
+#define EP_DELAY 5
+
+/** A specialisation of the SocketEngine class, designed to use linux 2.6 epoll().
+ */
+class EPollEngine : public SocketEngine
+{
+private:
+ /** These are used by epoll() to hold socket events
+ */
+ struct epoll_event* events;
+ int EngineHandle;
+public:
+ /** Create a new EPollEngine
+ */
+ EPollEngine();
+ /** Delete an EPollEngine
+ */
+ virtual ~EPollEngine();
+ virtual bool AddFd(EventHandler* eh, int event_mask);
+ virtual void OnSetEvent(EventHandler* eh, int old_mask, int new_mask);
+ virtual void DelFd(EventHandler* eh);
+ virtual int DispatchEvents();
+ virtual std::string GetName();
+};