OverSim
XmlRpcServerConnection.h
Go to the documentation of this file.
1 #ifndef _XMLRPCSERVERCONNECTION_H_
2 #define _XMLRPCSERVERCONNECTION_H_
3 //
4 // XmlRpc++ Copyright (c) 2002-2003 by Chris Morley
5 //
6 
12 #if defined(_MSC_VER)
13 # pragma warning(disable:4786) // identifier was truncated in debug info
14 #endif
15 
16 #ifndef MAKEDEPEND
17 # include <string>
18 #endif
19 
20 #include "XmlRpcValue.h"
21 #include "XmlRpcSource.h"
22 
23 namespace XmlRpc {
24 
25 
26  // The server waits for client connections and provides support for executing methods
27  class XmlRpcServer;
28  class XmlRpcServerMethod;
29 
32  public:
33 
35  XmlRpcServerConnection(int fd, XmlRpcServer* server, bool deleteOnClose = false);
37  virtual ~XmlRpcServerConnection();
38 
39  // XmlRpcSource interface implementation
42  virtual unsigned handleEvent(unsigned eventType);
43 
44  protected:
45 
47  bool readHeader();
48 
50  bool readRequest();
51 
53  bool writeResponse();
54 
55 
57  virtual void executeRequest();
58 
59 
62 
67 
69  std::string _header;
70 
73 
75  std::string _request;
76 
78  std::string _response;
79 
82 
84  bool _keepAlive;
85  };
86 } // namespace XmlRpc
87 
88 #endif // _XMLRPCSERVERCONNECTION_H_