From d705a805eb53fa1a7a3711cc795eb5892b1aeb33 Mon Sep 17 00:00:00 2001 From: Peter Thorson Date: Sun, 6 Jan 2013 08:53:58 -0600 Subject: [PATCH] adds ability to retrieve connection_hdl and some docs --- websocketpp/connection.hpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/websocketpp/connection.hpp b/websocketpp/connection.hpp index 912323060a..09c1627f61 100644 --- a/websocketpp/connection.hpp +++ b/websocketpp/connection.hpp @@ -191,11 +191,26 @@ public: * The connection handle is a token that can be shared outside the * WebSocket++ core for the purposes of identifying a connection and * sending it messages. + * + * @param hdl A connection_hdl that the connection will use to refer + * to itself. */ void set_handle(connection_hdl hdl) { m_connection_hdl = hdl; } + /// Get Connection Handle + /** + * The connection handle is a token that can be shared outside the + * WebSocket++ core for the purposes of identifying a connection and + * sending it messages. + * + * @return A handle to the connection + */ + connection_hdl get_handle() { + return m_connection_hdl; + } + void set_open_handler(open_handler h) { m_open_handler = h; }