summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/inspsocket.h7
-rw-r--r--include/socketengine.h6
-rw-r--r--include/users.h5
3 files changed, 18 insertions, 0 deletions
diff --git a/include/inspsocket.h b/include/inspsocket.h
index a07c2eb6f..208644645 100644
--- a/include/inspsocket.h
+++ b/include/inspsocket.h
@@ -275,7 +275,14 @@ class CoreExport StreamSocket : public EventHandler
int HookChainRead(IOHook* hook, std::string& rq);
protected:
+ /** The data which has been received from the socket. */
std::string recvq;
+
+ /** Swaps the internals of this StreamSocket with another one.
+ * @param other A StreamSocket to swap internals with.
+ */
+ void SwapInternals(StreamSocket& other);
+
public:
const Type type;
StreamSocket(Type sstype = SS_UNKNOWN)
diff --git a/include/socketengine.h b/include/socketengine.h
index d8d127f8b..9202c179d 100644
--- a/include/socketengine.h
+++ b/include/socketengine.h
@@ -164,6 +164,12 @@ class CoreExport EventHandler : public classbase
* registered with the SocketEngine
*/
int fd;
+
+ /** Swaps the internals of this EventHandler with another one.
+ * @param other A EventHandler to swap internals with.
+ */
+ void SwapInternals(EventHandler& other);
+
public:
/** Get the current file descriptor
* @return The file descriptor of this handler
diff --git a/include/users.h b/include/users.h
index dc7da40fe..94a8af9a4 100644
--- a/include/users.h
+++ b/include/users.h
@@ -700,6 +700,11 @@ class CoreExport UserIOHandler : public StreamSocket
* @param data The data to add to the write buffer
*/
void AddWriteBuf(const std::string &data);
+
+ /** Swaps the internals of this UserIOHandler with another one.
+ * @param other A UserIOHandler to swap internals with.
+ */
+ void SwapInternals(UserIOHandler& other);
};
typedef unsigned int already_sent_t;