X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=include%2Finspsocket.h;h=7b913ec566baac48ad7eefae77df0785d19c97ea;hb=d8ac63cd83293ab07659932d5ee6b83d7570bb57;hp=53eca2e91d4c292c31a396161cae342ae2bc9401;hpb=1f0485039a276ad1c2fa3d53d284e3a87940ec77;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/include/inspsocket.h b/include/inspsocket.h index 53eca2e91..7b913ec56 100644 --- a/include/inspsocket.h +++ b/include/inspsocket.h @@ -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