diff options
author | Peter Powell <petpow@saberuk.com> | 2018-10-16 14:53:27 +0100 |
---|---|---|
committer | Peter Powell <petpow@saberuk.com> | 2018-10-25 13:50:43 +0100 |
commit | d62c870ffb1bf02e4be65183f3ae4bbe2229fbb2 (patch) | |
tree | e8163ce84e879e501909fff1472419a2916a2e30 /include/users.h | |
parent | da96cf374de819399136023f6bc30dc30affd156 (diff) |
Store the type of a StreamSocket within itself.
Similar to with IOHooks this allows you to convert StreamSocket to
a UserIOHandler quickly.
Diffstat (limited to 'include/users.h')
-rw-r--r-- | include/users.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/include/users.h b/include/users.h index 4aed944ee..28b370725 100644 --- a/include/users.h +++ b/include/users.h @@ -683,7 +683,11 @@ class CoreExport UserIOHandler : public StreamSocket { public: LocalUser* const user; - UserIOHandler(LocalUser* me) : user(me) {} + UserIOHandler(LocalUser* me) + : StreamSocket(StreamSocket::SS_USER) + , user(me) + { + } void OnDataReady() CXX11_OVERRIDE; void OnSetEndPoint(const irc::sockets::sockaddrs& local, const irc::sockets::sockaddrs& remote) CXX11_OVERRIDE; void OnError(BufferedSocketError error) CXX11_OVERRIDE; |