diff options
-rw-r--r-- | include/websocket.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/websocket.h b/include/websocket.h index 5299c1a..2873e45 100644 --- a/include/websocket.h +++ b/include/websocket.h @@ -22,6 +22,12 @@ namespace crow virtual void send_text(const std::string& msg) = 0; virtual void close(const std::string& msg = "quit") = 0; virtual ~connection(){} + + void userdata(void* u) { userdata_ = u; } + void* userdata() { return userdata_; } + + private: + void* userdata_; }; template <typename Adaptor> |