policy refactor echo client passes all autobahn tests

This commit is contained in:
Peter Thorson
2011-12-06 22:14:30 -06:00
parent 0f5302d400
commit 689c136298
9 changed files with 95 additions and 46 deletions

View File

@@ -118,6 +118,17 @@ std::string uri::get_host() const {
return m_host;
}
std::string uri::get_host_port() const {
if (m_port == (m_secure ? DEFAULT_SECURE_PORT : DEFAULT_PORT)) {
return m_host;
} else {
std::stringstream p;
p << m_host << ":" << m_port;
return p.str();
}
}
uint16_t uri::get_port() const {
return m_port;
}