::do_messages, this,
std::placeholders::_1, cpClient));
}
@@ -381,15 +382,16 @@ public:
try
{
- WriteLog (lsDEBUG, WSServerHandlerLog) <<
- "Ws:: Receiving(" << cpClient->get_socket ().remote_endpoint () <<
- ") '" << mpMessage->get_payload () << "'";
+ WriteLog (lsDEBUG, HandlerLog)
+ << "Ws:: Receiving("
+ << cpClient->get_socket ().remote_endpoint ()
+ << ") '" << mpMessage->get_payload () << "'";
}
catch (...)
{
}
- if (mpMessage->get_opcode () != websocketpp_02::frame::opcode::TEXT)
+ if (!WebSocket::isTextMessage (*mpMessage))
{
Json::Value jvResult (Json::objectValue);
@@ -437,23 +439,21 @@ public:
boost::asio::ssl::context&
get_ssl_context ()
{
- return *port_->context;
+ return *port().context;
}
- bool
- plain_only()
+ bool plain_only()
{
- return port_->protocol.count("wss") == 0;
+ return port().protocol.count("wss") == 0;
}
- bool
- secure_only()
+ bool secure_only()
{
- return port_->protocol.count("ws") == 0;
+ return port().protocol.count("ws") == 0;
}
// Respond to http requests.
- bool http (connection_ptr cpClient)
+ bool http (connection_ptr cpClient) override
{
std::string reason;
@@ -468,7 +468,8 @@ public:
cpClient->set_body (
"" + systemName () +
" Test" + "" + systemName () +
- " Test
This page shows http(s) connectivity is working.
");
+ " TestThis page shows http(s) connectivity is working."
+ "