XmlRpc::XmlRpcServerConnection Class Reference

A class to handle XML RPC requests from a particular client. More...

#include <XmlRpcServerConnection.h>

Inheritance diagram for XmlRpc::XmlRpcServerConnection:

XmlRpc::XmlRpcSource

List of all members.

Public Member Functions

 XmlRpcServerConnection (int fd, XmlRpcServer *server, bool deleteOnClose=false)
 Constructor.
virtual ~XmlRpcServerConnection ()
 Destructor.
virtual unsigned handleEvent (unsigned eventType)
 Handle IO on the client connection socket.

Static Public Attributes

static const char METHODNAME_TAG [] = "<methodName>"
static const char PARAMS_TAG [] = "<params>"
static const char PARAMS_ETAG [] = "</params>"
static const char PARAM_TAG [] = "<param>"
static const char PARAM_ETAG [] = "</param>"
static const std::string SYSTEM_MULTICALL = "system.multicall"
static const std::string METHODNAME = "methodName"
static const std::string PARAMS = "params"
static const std::string FAULTCODE = "faultCode"
static const std::string FAULTSTRING = "faultString"

Protected Types

enum  ServerConnectionState { READ_HEADER, READ_REQUEST, WRITE_RESPONSE }

Protected Member Functions

bool readHeader ()
bool readRequest ()
bool writeResponse ()
virtual void executeRequest ()
std::string parseRequest (XmlRpcValue &params)
bool executeMethod (const std::string &methodName, XmlRpcValue &params, XmlRpcValue &result)
bool executeMulticall (const std::string &methodName, XmlRpcValue &params, XmlRpcValue &result)
void generateResponse (std::string const &resultXml)
void generateFaultResponse (std::string const &msg, int errorCode=-1)
std::string generateHeader (std::string const &body)

Protected Attributes

XmlRpcServer_server
ServerConnectionState _connectionState
std::string _header
int _contentLength
std::string _request
std::string _response
int _bytesWritten
bool _keepAlive


Detailed Description

A class to handle XML RPC requests from a particular client.

Member Function Documentation

unsigned XmlRpcServerConnection::handleEvent ( unsigned  eventType  )  [virtual]

Handle IO on the client connection socket.

Parameters:
eventType Type of IO event that occurred.
See also:
XmlRpcDispatch::EventType.

Implements XmlRpc::XmlRpcSource.

References XmlRpc::XmlRpcDispatch::ReadableEvent, and XmlRpc::XmlRpcDispatch::WritableEvent.


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

Generated on Sat Oct 18 22:40:05 2008 for XmlRpc++ by  doxygen 1.5.5