diff options
author | IOhannes m zmölnig <zmoelnig@users.sourceforge.net> | 2005-03-08 10:23:43 +0000 |
---|---|---|
committer | IOhannes m zmölnig <zmoelnig@users.sourceforge.net> | 2005-03-08 10:23:43 +0000 |
commit | 922cb5559b9f2f97279fa24cc9c5862c8b666495 (patch) | |
tree | 10b3616acd63f3d60689c1a26aa4ccadf6115511 /xmlrpc++/src/XmlRpcSource.cpp |
This commit was generated by cvs2svn to compensate for changes in r2603,svn2git-root
which included commits to RCS files with non-trunk default branches.
svn path=/trunk/externals/iem/iemxmlrpc/; revision=2604
Diffstat (limited to 'xmlrpc++/src/XmlRpcSource.cpp')
-rw-r--r-- | xmlrpc++/src/XmlRpcSource.cpp | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/xmlrpc++/src/XmlRpcSource.cpp b/xmlrpc++/src/XmlRpcSource.cpp new file mode 100644 index 0000000..99203b0 --- /dev/null +++ b/xmlrpc++/src/XmlRpcSource.cpp @@ -0,0 +1,35 @@ + +#include "XmlRpcSource.h" +#include "XmlRpcSocket.h" +#include "XmlRpcUtil.h" + +namespace XmlRpc { + + + XmlRpcSource::XmlRpcSource(int fd /*= -1*/, bool deleteOnClose /*= false*/) + : _fd(fd), _deleteOnClose(deleteOnClose), _keepOpen(false) + { + } + + XmlRpcSource::~XmlRpcSource() + { + } + + + void + XmlRpcSource::close() + { + if (_fd != -1) { + XmlRpcUtil::log(2,"XmlRpcSource::close: closing socket %d.", _fd); + XmlRpcSocket::close(_fd); + XmlRpcUtil::log(2,"XmlRpcSource::close: done closing socket %d.", _fd); + _fd = -1; + } + if (_deleteOnClose) { + XmlRpcUtil::log(2,"XmlRpcSource::close: deleting this"); + _deleteOnClose = false; + delete this; + } + } + +} // namespace XmlRpc |