diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-08-12 01:13:40 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-08-12 01:13:40 +0000 |
commit | d9d4f8fdadc06d86daba2879423e555519971868 (patch) | |
tree | db6712922d926535006921649488e1bab9c93156 /include/socketengine_epoll.h | |
parent | 787020a2d719a3becb6bcca1ad6b0df86c528888 (diff) |
Document some missing xline stuff
Document the variants of SocketEngine for epoll, kqueue and select
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4905 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'include/socketengine_epoll.h')
-rw-r--r-- | include/socketengine_epoll.h | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/include/socketengine_epoll.h b/include/socketengine_epoll.h index 65d1150f7..f675671e2 100644 --- a/include/socketengine_epoll.h +++ b/include/socketengine_epoll.h @@ -29,12 +29,21 @@ class InspIRCd; +/** A specialisation of the SocketEngine class, designed to use linux 2.6 epoll(). + */ class EPollEngine : public SocketEngine { private: - struct epoll_event events[MAX_DESCRIPTORS]; /* Up to 64k sockets for epoll */ + /** These are used by epoll() to hold socket events + */ + struct epoll_event events[MAX_DESCRIPTORS]; public: + /** Create a new EPollEngine + * @param Instance The creator of this object + */ EPollEngine(InspIRCd* Instance); + /** Delete an EPollEngine + */ virtual ~EPollEngine(); virtual bool AddFd(int fd, bool readable, char type); virtual int GetMaxFds(); @@ -44,9 +53,13 @@ public: virtual std::string GetName(); }; +/** Creates a SocketEngine + */ class SocketEngineFactory { public: + /** Create a new instance of SocketEngine based on EpollEngine + */ SocketEngine* Create(InspIRCd* Instance) { return new EPollEngine(Instance); } }; |