Finish modifying this code to use the JsonCpp library.

This commit is contained in:
JoelKatz
2011-12-19 08:02:16 -08:00
parent 0421268daa
commit c5509b8b00
2 changed files with 45 additions and 45 deletions

View File

@@ -1,10 +1,13 @@
#include "HttpRequest.h"
#include "RequestParser.h"
#include <boost/array.hpp>
#include <boost/shared_ptr.hpp>
#include <boost/enable_shared_from_this.hpp>
#include <boost/asio.hpp>
#include "json/value.h"
#include "HttpRequest.h"
#include "RequestParser.h"
class RPCServer : public boost::enable_shared_from_this<RPCServer>
{
boost::asio::ip::tcp::socket mSocket;
@@ -21,10 +24,10 @@ class RPCServer : public boost::enable_shared_from_this<RPCServer>
void handle_read(const boost::system::error_code& e, std::size_t bytes_transferred);
std::string handleRequest(std::string& requestStr);
std::string handleRequest(const std::string& requestStr);
void sendReply();
// json_spirit::Value doCommand(std::string& command,json_spirit::Array& params);
Json::Value doCommand(const std::string& command, Json::Value& params);
public:
typedef boost::shared_ptr<RPCServer> pointer;