From e2af2347fc035d702e45f12e772223a8d578410d Mon Sep 17 00:00:00 2001 From: danieldg Date: Mon, 21 Sep 2009 13:26:31 +0000 Subject: Create StreamSocket for IO hooking implementation Fixes the SSL SendQ bug Removes duplicate code between User and BufferedSocket Simplify SSL module API Simplify EventHandler API (Readable/Writeable moved to SE) Add hook for culled objects to invoke callbacks prior to destructor Replace SocketCull with GlobalCull now that sockets can close themselves Shorten common case of user read/parse/write path: User::Write is now zero-copy up to syscall/SSL invocation User::Read has only two copy/scan passes from read() to ProcessCommand git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11752 e03df62e-2008-0410-955e-edbf42e46eb7 --- include/socketengines/socketengine_kqueue.h | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'include/socketengines/socketengine_kqueue.h') diff --git a/include/socketengines/socketengine_kqueue.h b/include/socketengines/socketengine_kqueue.h index 41459f561..a09e93553 100644 --- a/include/socketengines/socketengine_kqueue.h +++ b/include/socketengines/socketengine_kqueue.h @@ -24,8 +24,6 @@ #include #include "socketengine.h" -class InspIRCd; - /** A specialisation of the SocketEngine class, designed to use FreeBSD kqueue(). */ class KQueueEngine : public SocketEngine @@ -39,13 +37,12 @@ private: struct timespec ts; public: /** Create a new KQueueEngine - * @param Instance The creator of this object */ - KQueueEngine(InspIRCd* Instance); + KQueueEngine(); /** Delete a KQueueEngine */ virtual ~KQueueEngine(); - virtual bool AddFd(EventHandler* eh); + virtual bool AddFd(EventHandler* eh, bool writeFirst = false); virtual int GetMaxFds(); virtual int GetRemainingFds(); virtual bool DelFd(EventHandler* eh, bool force = false); @@ -62,7 +59,7 @@ class SocketEngineFactory public: /** Create a new instance of SocketEngine based on KQueueEngine */ - SocketEngine* Create(InspIRCd* Instance) { return new KQueueEngine(Instance); } + SocketEngine* Create() { return new KQueueEngine; } }; #endif -- cgit v1.2.3