Add HTTPServer

This commit is contained in:
Vinnie Falco
2013-09-21 17:11:26 -07:00
parent ac1ebf403f
commit 0dc3cf07d0
11 changed files with 1492 additions and 5 deletions

View File

@@ -24,6 +24,8 @@ class NetworkOPsLog;
template <> char const* LogPartition::getPartitionName <NetworkOPsLog> () { return "NetworkOPs"; }
class RPCServiceManagerLog;
template <> char const* LogPartition::getPartitionName <RPCServiceManagerLog> () { return "RPCServiceManager"; }
class HTTPServerLog;
template <> char const* LogPartition::getPartitionName <HTTPServerLog> () { return "RPCServer"; }
//
//------------------------------------------------------------------------------
@@ -82,6 +84,9 @@ public:
// VFALCO NOTE LocalCredentials starts the deprecated UNL service
, m_deprecatedUNL (UniqueNodeList::New (*m_jobQueue))
, m_rpcHTTPServer (RPCHTTPServer::New (*m_jobQueue,
LogJournal::get <HTTPServerLog> (), *m_networkOPs))
, m_rpcServerHandler (*m_networkOPs) // passive object, not a Service
, m_nodeStoreScheduler (*m_jobQueue, *m_jobQueue)
@@ -577,6 +582,10 @@ public:
//
// Allow RPC connections.
//
#if RIPPLE_USE_RPC_SERVICE_MANAGER
m_rpcHTTPServer->setup (m_journal);
#else
if (! getConfig ().getRpcIP().empty () && getConfig ().getRpcPort() != 0)
{
try
@@ -596,6 +605,7 @@ public:
{
m_journal.info << "RPC interface: disabled";
}
#endif
//
// Begin connecting to network.
@@ -797,6 +807,7 @@ private:
LedgerMaster m_ledgerMaster;
ScopedPointer <NetworkOPs> m_networkOPs;
ScopedPointer <UniqueNodeList> m_deprecatedUNL;
ScopedPointer <RPCHTTPServer> m_rpcHTTPServer;
RPCServerHandler m_rpcServerHandler;
NodeStoreScheduler m_nodeStoreScheduler;
ScopedPointer <NodeStore::Database> m_nodeStore;