adds is_secure method to transport endpoint

This commit is contained in:
Peter Thorson
2013-03-28 22:58:39 -05:00
parent 4f00240a3b
commit 0b0106a97f
2 changed files with 18 additions and 0 deletions

View File

@@ -307,6 +307,10 @@ public:
boost::asio::io_service& get_io_service() {
return *m_io_service;
}
bool is_secure() const {
return socket_type::is_secure();
}
protected:
/// Initialize logging
/**

View File

@@ -71,6 +71,20 @@ public:
m_alog->write(log::alevel::devel,"register_ostream");
output_stream = o;
}
/// Tests whether or not the underlying transport is secure
/**
* iostream transport will return false always because it has no information
* about the ultimate remote endpoint. This may or may not be accurate
* depending on the real source of bytes being input.
*
* TODO: allow user settable is_secure flag if this seems useful
*
* @return Whether or not the underlying transport is secure
*/
bool is_secure() const {
return false;
}
protected:
/// Initialize logging
/**