diff --git a/Builds/VisualStudio2012/RippleD.vcxproj b/Builds/VisualStudio2012/RippleD.vcxproj
index 67c17eaac5..662a7b5567 100644
--- a/Builds/VisualStudio2012/RippleD.vcxproj
+++ b/Builds/VisualStudio2012/RippleD.vcxproj
@@ -954,12 +954,6 @@
true
true
-
- true
- true
- true
- true
-
true
true
@@ -1539,6 +1533,7 @@
+
diff --git a/Builds/VisualStudio2012/RippleD.vcxproj.filters b/Builds/VisualStudio2012/RippleD.vcxproj.filters
index 0946ea5384..9d7031492d 100644
--- a/Builds/VisualStudio2012/RippleD.vcxproj.filters
+++ b/Builds/VisualStudio2012/RippleD.vcxproj.filters
@@ -840,9 +840,6 @@
[1] Ripple\ripple_net\basics
-
- [1] Ripple\ripple_net\basics
-
[1] Ripple\ripple_net\basics
@@ -1706,6 +1703,9 @@
[1] Ripple\ripple_net\rpc
+
+ [1] Ripple\ripple_net\basics\impl
+
diff --git a/modules/ripple_net/basics/RPCDoor.cpp b/modules/ripple_net/basics/RPCDoor.cpp
index 5997725b9a..1bd4bfb3af 100644
--- a/modules/ripple_net/basics/RPCDoor.cpp
+++ b/modules/ripple_net/basics/RPCDoor.cpp
@@ -39,8 +39,9 @@ public:
void startListening ()
{
- RPCServer::pointer new_connection = RPCServer::New (
- mAcceptor.get_io_service (), m_sslContext->get (), m_rpcServerHandler);
+ // VFALCO NOTE Why not use make_shared?
+ RPCServerImp::pointer new_connection (boost::make_shared (
+ mAcceptor.get_io_service (), m_sslContext->get (), m_rpcServerHandler));
mAcceptor.set_option (boost::asio::ip::tcp::acceptor::reuse_address (true));
@@ -66,7 +67,7 @@ public:
//--------------------------------------------------------------------------
- void handleConnect (RPCServer::pointer new_connection, boost::system::error_code const& error)
+ void handleConnect (RPCServerImp::pointer new_connection, boost::system::error_code const& error)
{
bool delay = false;
diff --git a/modules/ripple_net/basics/RPCServer.h b/modules/ripple_net/basics/RPCServer.h
index 9608567c60..2c7639f5fc 100644
--- a/modules/ripple_net/basics/RPCServer.h
+++ b/modules/ripple_net/basics/RPCServer.h
@@ -8,16 +8,10 @@
#define RIPPLE_NET_BASICS_RPCSERVER_H_INCLUDED
/** Provides RPC services to a client.
-
Each client has a separate instance of this object.
*/
-// VFALCO NOTE This looks like intrusve shared object?
-//
-class RPCServer : public boost::enable_shared_from_this
+class RPCServer
{
-public:
- typedef boost::shared_ptr pointer;
-
public:
/** Handles a RPC client request.
*/
@@ -42,20 +36,12 @@ public:
virtual std::string processRequest (std::string const& request, std::string const& remoteAddress) = 0;
};
- static pointer New (
- boost::asio::io_service& io_service,
- boost::asio::ssl::context& context,
- Handler& handler);
-
virtual ~RPCServer () { }
/** Called when the connection is established.
*/
virtual void connected () = 0;
- // VFALCO TODO AutoSocket exposes all sorts of boost::asio interface
- virtual AutoSocket& getSocket () = 0;
-
// VFALCO TODO Remove this since it exposes boost
virtual boost::asio::ip::tcp::socket& getRawSocket () = 0;
diff --git a/modules/ripple_net/basics/RPCServer.cpp b/modules/ripple_net/basics/impl/RPCServerImp.h
similarity index 95%
rename from modules/ripple_net/basics/RPCServer.cpp
rename to modules/ripple_net/basics/impl/RPCServerImp.h
index 1939d9b1f0..4c879be60b 100644
--- a/modules/ripple_net/basics/RPCServer.cpp
+++ b/modules/ripple_net/basics/impl/RPCServerImp.h
@@ -6,9 +6,14 @@
SETUP_LOG (RPCServer)
-class RPCServerImp : public RPCServer, LeakChecked
+class RPCServerImp
+ : public RPCServer
+ , public boost::enable_shared_from_this
+ , public LeakChecked
{
public:
+ typedef boost::shared_ptr pointer;
+
RPCServerImp (
boost::asio::io_service& io_service,
boost::asio::ssl::context& context,
@@ -20,7 +25,7 @@ public:
}
//--------------------------------------------------------------------------
-private:
+
enum
{
maxQueryBytes = 1024 * 1024
@@ -256,13 +261,3 @@ private:
HTTPRequest mHTTPRequest;
};
-
-//------------------------------------------------------------------------------
-
-RPCServer::pointer RPCServer::New (
- boost::asio::io_service& io_service,
- boost::asio::ssl::context& context,
- Handler& handler)
-{
- return pointer (new RPCServerImp (io_service, context, handler));
-}
diff --git a/modules/ripple_net/ripple_net.cpp b/modules/ripple_net/ripple_net.cpp
index 107332558a..64488d8e34 100644
--- a/modules/ripple_net/ripple_net.cpp
+++ b/modules/ripple_net/ripple_net.cpp
@@ -28,6 +28,8 @@
#include "ripple_net.h"
+#include "../ripple_websocket/ripple_websocket.h" // for HTTPClient, RPCDoor
+
namespace ripple
{
@@ -36,8 +38,8 @@ namespace ripple
#include "basics/MultiSocket.cpp"
#include "basics/HTTPRequest.cpp"
#include "basics/HTTPClient.cpp"
+# include "basics/impl/RPCServerImp.h"
#include "basics/RPCDoor.cpp"
-#include "basics/RPCServer.cpp"
#include "basics/SNTPClient.cpp"
#include "rpc/RPCCall.cpp"
diff --git a/modules/ripple_net/ripple_net.h b/modules/ripple_net/ripple_net.h
index 61668b6fff..316a6d2fce 100644
--- a/modules/ripple_net/ripple_net.h
+++ b/modules/ripple_net/ripple_net.h
@@ -17,9 +17,6 @@
#include "../ripple_core/ripple_core.h"
#include "../ripple_data/ripple_data.h"
-// VFALCO TODO MOVE TO .cpp ASAP!, make users abstract!
-#include "../ripple_websocket/ripple_websocket.h"
-
namespace ripple
{