I'm making a tool to remotely control a HTPC that runs XBMC. I want to
support both TCP and HTTP, but I noticed that for the derived clients,
TcpClient and HttpClient, the [ssize_t Send(const std::string& data)]
function is local to each derived class, and is not purely virtual from the
base Client class. I came into problems when I tried to construct the
clients from the base class depending on arguments supplied at runtime. For
if(Args.getProto() == "tcp")
client = new Json::Rpc::TcpClient(Args.getHost(), Args.getPort());
} else if(Args.getProto() == "http")
client = new Json::Rpc::HttpClient(Args.getHost(), Args.getPort());
... builds queryStr ...
client->Send(queryStr); <--- This causes error: 'class Json::Rpc::Client'
has no member named 'Send'
I'm new to Jsonrpc-cpp, so maybe I'm having a brain fart and I'm not seeing
why Send(const std::string& data) is not purely virtual. Anyone else ran
into problems like this? I haven't had the time to see if I can patch up
the library and make it work, I may do that later this weekend.
Get latest updates about Open Source Projects, Conferences and News.