From 9ca476ae22eb733ad7e015d19e6e740217f6b807 Mon Sep 17 00:00:00 2001 From: Peter Thorson Date: Sun, 6 Jan 2013 09:16:49 -0600 Subject: [PATCH] iostream connection now receives connection hdl --- websocketpp/transport/iostream/connection.hpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/websocketpp/transport/iostream/connection.hpp b/websocketpp/transport/iostream/connection.hpp index a59ad5fa9d..41f2bc24d3 100644 --- a/websocketpp/transport/iostream/connection.hpp +++ b/websocketpp/transport/iostream/connection.hpp @@ -29,6 +29,7 @@ #define WEBSOCKETPP_TRANSPORT_IOSTREAM_CON_HPP #include +#include #include #include @@ -161,6 +162,14 @@ protected: void set_handler(handler_ptr new_handler) { m_handler = new_handler; } + + /// Set Connection Handle + /** + * @param hdl The new handle + */ + void set_handle(connection_hdl hdl) { + m_connection_hdl = hdl; + } lib::error_code dispatch(dispatch_handler handler) { handler(); @@ -212,6 +221,7 @@ private: // transport resources std::ostream* output_stream; handler_ptr m_handler; + connection_hdl m_connection_hdl; bool m_reading; const bool m_is_server;