XmlRpcSource.h
Go to the documentation of this file.
00001 
00002 #ifndef _XMLRPCSOURCE_H_
00003 #define _XMLRPCSOURCE_H_
00004 //
00005 // XmlRpc++ Copyright (c) 2002-2003 by Chris Morley
00006 //
00007 #if defined(_MSC_VER)
00008 # pragma warning(disable:4786)    // identifier was truncated in debug info
00009 #endif
00010 
00011 #include "XmlRpcDecl.h"
00012 
00013 namespace XmlRpc {
00014 
00016   class XMLRPCPP_DECL XmlRpcSource {
00017   public:
00021     XmlRpcSource(int fd = -1, bool deleteOnClose = false);
00022 
00024     virtual ~XmlRpcSource();
00025 
00027     int getfd() const { return _fd; }
00029     void setfd(int fd) { _fd = fd; }
00030 
00032     bool getKeepOpen() const { return _keepOpen; }
00034     void setKeepOpen(bool b=true) { _keepOpen = b; }
00035 
00037     virtual void close();
00038 
00040     virtual unsigned handleEvent(unsigned eventType) = 0;
00041 
00042   private:
00043 
00044     // Socket. This should really be a SOCKET (an alias for unsigned int*) on windows...
00045     int _fd;
00046 
00047     // In the server, a new source (XmlRpcServerConnection) is created
00048     // for each connected client. When each connection is closed, the
00049     // corresponding source object is deleted.
00050     bool _deleteOnClose;
00051 
00052     // In the client, keep connections open if you intend to make multiple calls.
00053     bool _keepOpen;
00054   };
00055 } // namespace XmlRpc
00056 
00057 #endif //_XMLRPCSOURCE_H_


xmlrpcpp
Author(s): Chris Morley, Konstantin Pilipchuk, Morgan Quigley
autogenerated on Fri Aug 28 2015 12:33:06