Refactor Server:

* Remove HTTP namespace
* Rename connection classes
* Mark Server test automatic
* Build server sources in classic
This commit is contained in:
Vinnie Falco
2016-02-02 09:08:50 -05:00
parent ba38bfad9d
commit 137dd351b8
31 changed files with 286 additions and 241 deletions

View File

@@ -21,8 +21,30 @@
#include <beast/http/rfc2616.h>
namespace ripple {
namespace HTTP {
bool
Port::websockets() const
{
return protocol.count("ws") > 0 || protocol.count("wss") > 0;
}
bool
Port::secure() const
{
return protocol.count("peer") > 0 ||
protocol.count("https") > 0 || protocol.count("wss") > 0;
}
std::string
Port::protocols() const
{
std::string s;
for (auto iter = protocol.cbegin();
iter != protocol.cend(); ++iter)
s += (iter != protocol.cbegin() ? "," : "") + *iter;
return s;
}
std::ostream&
operator<< (std::ostream& os, Port const& p)
{
@@ -46,8 +68,6 @@ operator<< (std::ostream& os, Port const& p)
return os;
}
} // HTTP
//------------------------------------------------------------------------------
static