]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - include/inspsocket.h
Extract code that flushes the sendq from StreamSocket::DoWrite() into FlushSendQ()
[user/henk/code/inspircd.git] / include / inspsocket.h
index 53eca2e91d4c292c31a396161cae342ae2bc9401..7b913ec566baac48ad7eefae77df0785d19c97ea 100644 (file)
@@ -228,6 +228,12 @@ class CoreExport StreamSocket : public EventHandler
         */
        void DoRead();
 
+       /** Send as much data contained in a SendQueue object as possible.
+        * All data which successfully sent will be removed from the SendQueue.
+        * @param sq SendQueue to flush
+        */
+       void FlushSendQ(SendQueue& sq);
+
  protected:
        std::string recvq;
  public:
@@ -284,6 +290,12 @@ class CoreExport StreamSocket : public EventHandler
        virtual void Close();
        /** This ensures that close is called prior to destructor */
        virtual CullResult cull();
+
+       /** Get the IOHook of a module attached to this socket
+        * @param mod Module whose IOHook to return
+        * @return IOHook belonging to the module or NULL if the module haven't attached an IOHook to this socket
+        */
+       IOHook* GetModHook(Module* mod) const;
 };
 /**
  * BufferedSocket is an extendable socket class which modules