adds the ability to set a connection URI outside of the server handshake

This commit is contained in:
Peter Thorson
2013-03-30 07:05:08 -05:00
parent afd5646ca5
commit 7afcd866a0
2 changed files with 15 additions and 0 deletions

View File

@@ -497,6 +497,15 @@ public:
* @return The port component of the connection URI
*/
uint16_t get_port() const;
/// Sets the connection URI
/**
* This should really only be called by internal library methods unless you
* really know what you are doing.
*
* @param uri The new URI to set
*/
void set_uri(uri_ptr uri);
/////////////////////////////////////////////////////////////
// Pass-through access to the request and response objects //

View File

@@ -299,6 +299,12 @@ uint16_t connection<config>::get_port() const {
return m_uri->get_port();
}
template <typename config>
void connection<config>::set_uri(uri_ptr uri) {
//scoped_lock_type lock(m_connection_state_lock);
m_uri = uri;
}