XmlRpc++: XmlRpc::XmlRpcServer Class Reference

# XmlRpc::XmlRpcServer Class Reference

A class to handle XML RPC requests. More...

`#include <XmlRpcServer.h>`

Inheritance diagram for XmlRpc::XmlRpcServer:

List of all members.

## Public Member Functions
| XmlRpcServer ()
| Create a server object.
virtual | ~XmlRpcServer ()
| Destructor.
void | enableIntrospection (bool enabled=true)
| Specify whether introspection is enabled or not. Default is not enabled.
void | addMethod (XmlRpcServerMethod *method)
| Add a command to the RPC server.
void | removeMethod (XmlRpcServerMethod *method)
| Remove a command from the RPC server.
void | removeMethod (const std::string &methodName)
| Remove a command from the RPC server by name.
XmlRpcServerMethod * | findMethod (const std::string &name) const
| Look up a method by name.
bool | bindAndListen (int port, int backlog=5)
| Create a socket, bind to the specified port, and set it in listen mode to make it available for clients.
void | work (double msTime)
| Process client requests for the specified time.
void | exit ()
| Temporarily stop processing client requests and exit the work() method.
void | shutdown ()
| Close all connections with clients and the socket file descriptor.
void | listMethods (XmlRpcValue &result)
| Introspection support.
virtual unsigned | handleEvent (unsigned eventType)
| Handle client connection requests.
virtual void | removeConnection (XmlRpcServerConnection *)
| Remove a connection from the dispatcher.
## Protected Types
typedef std::map< std::string, XmlRpcServerMethod * > | MethodMap
## Protected Member Functions
virtual void | acceptConnection ()
| Accept a client connection request.
virtual XmlRpcServerConnection * | createConnection (int socket)
| Create a new connection object for processing requests from a specific client.
## Protected Attributes
bool | _introspectionEnabled
XmlRpcDispatch | _disp
MethodMap | _methods
XmlRpcServerMethod * | _listMethods
XmlRpcServerMethod * | _methodHelp

## Detailed Description

A class to handle XML RPC requests.

## Member Function Documentation

bool XmlRpcServer::bindAndListen | ( | int | port,
|  | int | backlog = `5` |
| ) |  |  |

Create a socket, bind to the specified port, and set it in listen mode to make it available for clients.

References XmlRpc::XmlRpcDispatch::addSource(), XmlRpc::XmlRpcSocket::bind(), XmlRpc::XmlRpcSource::close(), XmlRpc::XmlRpcUtil::error(), XmlRpc::XmlRpcSocket::getErrorMsg(), XmlRpc::XmlRpcSocket::listen(), XmlRpc::XmlRpcUtil::log(), XmlRpc::XmlRpcDispatch::ReadableEvent, XmlRpc::XmlRpcSource::setfd(), XmlRpc::XmlRpcSocket::setNonBlocking(), XmlRpc::XmlRpcSocket::setReuseAddr(), and XmlRpc::XmlRpcSocket::socket().

The documentation for this class was generated from the following files:

- XmlRpcServer.h
- XmlRpcServer.cpp