diff --git a/Builds/VisualStudio2013/RippleD.vcxproj b/Builds/VisualStudio2013/RippleD.vcxproj
index 9a37031a1c..e2d4ebe8a7 100644
--- a/Builds/VisualStudio2013/RippleD.vcxproj
+++ b/Builds/VisualStudio2013/RippleD.vcxproj
@@ -4210,7 +4210,7 @@
-
+
diff --git a/Builds/VisualStudio2013/RippleD.vcxproj.filters b/Builds/VisualStudio2013/RippleD.vcxproj.filters
index 04a6f3d63f..d03ad90c81 100644
--- a/Builds/VisualStudio2013/RippleD.vcxproj.filters
+++ b/Builds/VisualStudio2013/RippleD.vcxproj.filters
@@ -5667,7 +5667,7 @@
websocket\src
-
+
websocket\src\sockets
diff --git a/src/ripple/app/websocket/WSServerHandler.h b/src/ripple/app/websocket/WSServerHandler.h
index 56e72fc505..55952890bb 100644
--- a/src/ripple/app/websocket/WSServerHandler.h
+++ b/src/ripple/app/websocket/WSServerHandler.h
@@ -204,7 +204,7 @@ public:
assert (result.second);
(void) result.second;
WriteLog (lsDEBUG, WSServerHandlerLog) <<
- "Ws:: on_open(" << cpClient->get_socket ().remote_endpoint ().to_string () << ")";
+ "Ws:: on_open(" << cpClient->get_socket ().remote_endpoint() << ")";
}
catch (...)
{
@@ -226,7 +226,7 @@ public:
try
{
WriteLog (lsDEBUG, WSServerHandlerLog) <<
- "Ws:: on_pong(" << cpClient->get_socket ().remote_endpoint ().to_string () << ")";
+ "Ws:: on_pong(" << cpClient->get_socket ().remote_endpoint() << ")";
}
catch (...)
{
@@ -258,7 +258,7 @@ public:
{
WriteLog (lsDEBUG, WSServerHandlerLog) <<
"Ws:: " << reason << "(" <<
- cpClient->get_socket ().remote_endpoint ().to_string () << ") not found";
+ cpClient->get_socket ().remote_endpoint() << ") not found";
}
catch (...)
{
@@ -274,7 +274,7 @@ public:
{
WriteLog (lsDEBUG, WSServerHandlerLog) <<
"Ws:: " << reason << "(" <<
- cpClient->get_socket ().remote_endpoint ().to_string () << ") found";
+ cpClient->get_socket ().remote_endpoint () << ") found";
}
catch (...)
{
@@ -306,7 +306,7 @@ public:
try
{
WriteLog (lsDEBUG, WSServerHandlerLog) <<
- "Ws:: Rejected(" << to_string (cpClient->get_socket ().remote_endpoint ()) <<
+ "Ws:: Rejected(" << cpClient->get_socket().remote_endpoint() <<
") '" << mpMessage->get_payload () << "'";
}
catch (...)
@@ -366,7 +366,7 @@ public:
try
{
WriteLog (lsDEBUG, WSServerHandlerLog) <<
- "Ws:: Receiving(" << to_string (cpClient->get_socket ().remote_endpoint ()) <<
+ "Ws:: Receiving(" << cpClient->get_socket ().remote_endpoint () <<
") '" << mpMessage->get_payload () << "'";
}
catch (...)
diff --git a/src/ripple/resource/api/Manager.h b/src/ripple/resource/api/Manager.h
index b30f84e08e..3587dccb34 100644
--- a/src/ripple/resource/api/Manager.h
+++ b/src/ripple/resource/api/Manager.h
@@ -22,7 +22,6 @@
#include
#include
-
#include
#include
#include
diff --git a/src/ripple/unity/websocket.h b/src/ripple/unity/websocket.h
index 7424facd07..3d4de77af5 100644
--- a/src/ripple/unity/websocket.h
+++ b/src/ripple/unity/websocket.h
@@ -33,7 +33,7 @@
#include
#include
-#include
+#include
#include
#include
diff --git a/src/ripple/websocket/autosocket/AutoSocket.h b/src/ripple/websocket/autosocket/AutoSocket.h
index eee9709472..75fa330d13 100644
--- a/src/ripple/websocket/autosocket/AutoSocket.h
+++ b/src/ripple/websocket/autosocket/AutoSocket.h
@@ -21,6 +21,7 @@
#define RIPPLE_WEBSOCKET_AUTOSOCKET_H_INCLUDED
#include
+#include
#include
#include
#include
@@ -85,6 +86,20 @@ public:
mBuffer.clear ();
}
+ beast::IP::Endpoint
+ local_endpoint()
+ {
+ return beast::IP::from_asio(
+ lowest_layer().local_endpoint());
+ }
+
+ beast::IP::Endpoint
+ remote_endpoint()
+ {
+ return beast::IP::from_asio(
+ lowest_layer().remote_endpoint());
+ }
+
lowest_layer_type& lowest_layer ()
{
return mSocket->lowest_layer ();
diff --git a/src/websocket/src/endpoint.hpp b/src/websocket/src/endpoint.hpp
index c457ef5d78..862243c1c2 100644
--- a/src/websocket/src/endpoint.hpp
+++ b/src/websocket/src/endpoint.hpp
@@ -29,7 +29,7 @@
#define WEBSOCKETPP_ENDPOINT_HPP
#include "connection.hpp"
-#include "sockets/multitls.hpp" // should this be here?
+#include "sockets/autotls.hpp" // should this be here?
#include "logger/logger.hpp"
#include
@@ -74,7 +74,7 @@ protected:
*/
template <
template class role,
- template class socket = socket::multitls,
+ template class socket = socket::autotls,
template class logger = log::logger>
class endpoint
: public endpoint_base,
diff --git a/src/websocket/src/roles/server.hpp b/src/websocket/src/roles/server.hpp
index 35c8c04d6f..01b4d9ffe4 100644
--- a/src/websocket/src/roles/server.hpp
+++ b/src/websocket/src/roles/server.hpp
@@ -607,7 +607,7 @@ void server::connection::handle_read_request(
m_version = -1;
shared_const_buffer buffer(reply);
- async_write(
+ boost::asio::async_write(
m_connection.get_socket(),
shared_const_buffer(reply),
boost::bind(
@@ -866,7 +866,7 @@ void server::connection::write_response() {
m_endpoint.m_alog->at(log::alevel::DEBUG_HANDSHAKE) << raw << log::endl;
- async_write(
+ boost::asio::async_write(
m_connection.get_socket(),
//boost::asio::buffer(raw),
buffer,
diff --git a/src/websocket/src/sockets/autotls.hpp b/src/websocket/src/sockets/autotls.hpp
index 803e7e65b2..6028040974 100644
--- a/src/websocket/src/sockets/autotls.hpp
+++ b/src/websocket/src/sockets/autotls.hpp
@@ -28,6 +28,9 @@
#ifndef WEBSOCKETPP_SOCKET_AUTOTLS_HPP
#define WEBSOCKETPP_SOCKET_AUTOTLS_HPP
+#include
+#include
+
// Note that AutoSocket.h must be included before this file
namespace websocketpp {
@@ -89,6 +92,12 @@ public:
bool is_secure() {
return m_socket_ptr->isSecure();
}
+
+ typename AutoSocket::lowest_layer_type&
+ get_native_socket() {
+ return m_socket_ptr->lowest_layer();
+ }
+
protected:
connection(autotls& e)
: m_endpoint(e)
@@ -115,11 +124,11 @@ public:
m_socket_ptr->async_handshake(
m_endpoint.get_handshake_type(),
- boost::bind(
+ std::bind(
&connection::handle_init,
this,
callback,
- boost::asio::placeholders::error
+ beast::asio::placeholders::error
)
);
}
@@ -135,10 +144,10 @@ public:
boost::system::error_code ignored_ec;
m_socket_ptr->async_shutdown( // Don't block on connection shutdown DJS
- boost::bind(
+ std::bind(
&autotls::handle_shutdown,
m_socket_ptr,
- boost::asio::placeholders::error
+ beast::asio::placeholders::error
)
);
diff --git a/src/websocket/src/websocketpp.hpp b/src/websocket/src/websocketpp.hpp
index 8ae9e804af..6456402c3d 100644
--- a/src/websocket/src/websocketpp.hpp
+++ b/src/websocket/src/websocketpp.hpp
@@ -45,6 +45,10 @@ namespace websocketpp {
typedef websocketpp::endpoint server_multitls;
#endif
+ #ifdef WEBSOCKETPP_SOCKET_AUTOTLS_HPP
+ typedef websocketpp::endpoint server_multitls;
+ #endif
#endif