24 std::string
help() {
return std::string(
"Say hello"); }
37 std::string resultString =
"Hello, ";
38 resultString += std::string(params[0]);
39 result = resultString;
52 int nArgs = params.
size();
54 for (
int i=0; i<nArgs; ++i)
55 sum +=
double(params[i]);
61int main(
int argc,
char* argv[])
64 std::cerr <<
"Usage: HelloServer serverPort\n";
67 int port = atoi(argv[1]);
HelloName(XmlRpcServer *s)
void execute(XmlRpcValue ¶ms, XmlRpcValue &result)
Execute the method. Subclasses must provide a definition for this method.
void execute(XmlRpcValue ¶ms, XmlRpcValue &result)
Execute the method. Subclasses must provide a definition for this method.
void execute(XmlRpcValue ¶ms, XmlRpcValue &result)
Execute the method. Subclasses must provide a definition for this method.
Abstract class representing a single RPC method.
A class to handle XML RPC requests.
bool bindAndListen(int port, int backlog=5)
void enableIntrospection(bool enabled=true)
Specify whether introspection is enabled or not. Default is not enabled.
void work(double msTime)
Process client requests for the specified time.
RPC method arguments and results are represented by Values.
int size() const
Return the size for string, base64, array, and struct values.
void setVerbosity(int level)
Sets log message verbosity. This is short for XmlRpcLogHandler::setVerbosity(level)